Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .text:080C73A0 ; int __cdecl sub_80C73A0(struct in_addr in, __int16, void *buf, int, int fd)
- .text:080C73A0 sub_80C73A0 proc near ; CODE XREF: sub_808E6C0+A6p
- .text:080C73A0
- .text:080C73A0 var_7C = dword ptr -7Ch
- .text:080C73A0 s = dword ptr -78h
- .text:080C73A0 var_74 = dword ptr -74h
- .text:080C73A0 var_70 = dword ptr -70h
- .text:080C73A0 var_6C = dword ptr -6Ch
- .text:080C73A0 var_68 = dword ptr -68h
- .text:080C73A0 var_64 = dword ptr -64h
- .text:080C73A0 var_60 = dword ptr -60h
- .text:080C73A0 var_5C = dword ptr -5Ch
- .text:080C73A0 var_58 = dword ptr -58h
- .text:080C73A0 var_54 = dword ptr -54h
- .text:080C73A0 var_50 = dword ptr -50h
- .text:080C73A0 var_4C = dword ptr -4Ch
- .text:080C73A0 var_48 = dword ptr -48h
- .text:080C73A0 src = dword ptr -44h
- .text:080C73A0 n = dword ptr -40h
- .text:080C73A0 ptr = dword ptr -3Ch
- .text:080C73A0 var_38 = dword ptr -38h
- .text:080C73A0 var_34 = dword ptr -34h
- .text:080C73A0 var_20 = dword ptr -20h
- .text:080C73A0 var_1C = dword ptr -1Ch
- .text:080C73A0 var_C = dword ptr -0Ch
- .text:080C73A0 var_8 = dword ptr -8
- .text:080C73A0 var_4 = dword ptr -4
- .text:080C73A0 in = in_addr ptr 8
- .text:080C73A0 arg_4 = word ptr 0Ch
- .text:080C73A0 buf = dword ptr 10h
- .text:080C73A0 arg_C = dword ptr 14h
- .text:080C73A0 fd = dword ptr 18h
- .text:080C73A0
- .text:080C73A0 push ebp
- .text:080C73A1 mov ebp, esp
- .text:080C73A3 sub esp, 0A8h
- .text:080C73A9 mov [ebp+var_C], ebx
- .text:080C73AC mov ebx, [ebp+arg_C]
- .text:080C73AF mov [ebp+var_8], esi
- .text:080C73B2 mov esi, [ebp+in.s_addr]
- .text:080C73B5 cmp ebx, 4
- .text:080C73B8 mov [ebp+var_4], edi
- .text:080C73BB mov edi, [ebp+buf]
- .text:080C73BE movzx edx, [ebp+arg_4]
- .text:080C73C2 jle short loc_80C73CC
- .text:080C73C4 cmp dword ptr [edi], 504D4153h
- .text:080C73CA jz short loc_80C73E0
- .text:080C73CC
- .text:080C73CC loc_80C73CC: ; CODE XREF: sub_80C73A0+22j
- .text:080C73CC ; sub_80C73A0+47j ...
- .text:080C73CC xor ecx, ecx
- .text:080C73CE
- .text:080C73CE loc_80C73CE: ; CODE XREF: sub_80C73A0+B7j
- .text:080C73CE ; sub_80C73A0+DAj ...
- .text:080C73CE mov ebx, [ebp+var_C]
- .text:080C73D1 mov eax, ecx
- .text:080C73D3 mov esi, [ebp+var_8]
- .text:080C73D6 mov edi, [ebp+var_4]
- .text:080C73D9 mov esp, ebp
- .text:080C73DB pop ebp
- .text:080C73DC retn
- .text:080C73DC ; ---------------------------------------------------------------------------
- .text:080C73DD align 10h
- .text:080C73E0
- .text:080C73E0 loc_80C73E0: ; CODE XREF: sub_80C73A0+2Aj
- .text:080C73E0 mov eax, ds:dword_8192F68
- .text:080C73E5 test eax, eax
- .text:080C73E7 jz short loc_80C73CC
- .text:080C73E9 cmp dword ptr [eax+59h], 1
- .text:080C73ED jnz short loc_80C73CC
- .text:080C73EF cmp ebx, 0Ah
- .text:080C73F2 jle loc_80C75BF ; default
- .text:080C73F2 ; jumptable 080C7433 cases 2-5,7-12,14,16-20
- .text:080C73F8 mov dword ptr ds:addr.sa_data+2, esi
- .text:080C73FE mov eax, 2
- .text:080C7403 mov ds:addr.sa_family, ax
- .text:080C7409 mov eax, edx
- .text:080C740B ror ax, 8
- .text:080C740F cmp ds:byte_8192F44, 0
- .text:080C7416 mov word ptr ds:addr.sa_data, ax
- .text:080C741C jnz loc_80C7BA1
- .text:080C7422
- .text:080C7422 loc_80C7422: ; CODE XREF: sub_80C73A0+821j
- .text:080C7422 movzx eax, byte ptr [edi+0Ah]
- .text:080C7426 sub al, 63h
- .text:080C7428 cmp al, 15h ; switch 22 cases
- .text:080C742A ja loc_80C75BF ; default
- .text:080C742A ; jumptable 080C7433 cases 2-5,7-12,14,16-20
- .text:080C7430 movzx eax, al
- .text:080C7433 jmp ds:off_8147AD4[eax*4] ; switch jump
- .text:080C743A
- .text:080C743A loc_80C743A: ; DATA XREF: .rodata:off_8147AD4o
- .text:080C743A mov eax, offset aQuery ; jumptable 080C7433 case 21
- .text:080C743F mov [esp+4], eax ; src
- .text:080C7443 mov eax, ds:dword_8192F64
- .text:080C7448 mov [esp], eax ; int
- .text:080C744B call sub_80A84F0
- .text:080C7450 test al, al
- .text:080C7452 mov ecx, 1
- .text:080C7457 jz loc_80C73CE
- .text:080C745D mov eax, offset aRcon ; "rcon"
- .text:080C7462 mov [esp+4], eax ; src
- .text:080C7466 mov eax, ds:dword_8192F64
- .text:080C746B mov [esp], eax ; int
- .text:080C746E call sub_80A84F0
- .text:080C7473 test al, al
- .text:080C7475 mov ecx, 1
- .text:080C747A jz loc_80C73CE
- .text:080C7480 mov [esp], esi
- .text:080C7483 call sub_80C7240
- .text:080C7488 test eax, eax
- .text:080C748A mov ecx, 1
- .text:080C748F jnz loc_80C73CE
- .text:080C7495 mov edx, edi
- .text:080C7497 add edi, 0Bh
- .text:080C749A cmp ebx, 0Dh
- .text:080C749D jl loc_80C75A4
- .text:080C74A3 movzx ecx, word ptr [edi]
- .text:080C74A6 add edi, 2
- .text:080C74A9 lea eax, [ecx+0Dh]
- .text:080C74AC mov [ebp+n], ecx
- .text:080C74AF cmp ebx, eax
- .text:080C74B1 jl loc_80C75A4
- .text:080C74B7 mov ds:src, edx
- .text:080C74BD mov eax, [ebp+fd]
- .text:080C74C0 mov dword_8180854, eax
- .text:080C74C5 mov eax, 0Bh
- .text:080C74CA mov ds:n, eax
- .text:080C74CF mov eax, ecx
- .text:080C74D1 inc eax
- .text:080C74D2 mov [esp], eax ; size
- .text:080C74D5 call _malloc
- .text:080C74DA mov [ebp+ptr], eax
- .text:080C74DD mov edx, [ebp+n]
- .text:080C74E0 mov [esp+4], edi ; src
- .text:080C74E4 mov [esp], eax ; dest
- .text:080C74E7 mov [esp+8], edx ; n
- .text:080C74EB call _memcpy
- .text:080C74F0 mov ecx, [ebp+n]
- .text:080C74F3 mov eax, [ebp+ptr]
- .text:080C74F6 add edi, ecx
- .text:080C74F8 mov byte ptr [ecx+eax], 0
- .text:080C74FC mov eax, ds:dword_8192F64
- .text:080C7501 mov ecx, offset aRcon_ ; "rcon_"
- .text:080C7506 mov [esp+4], ecx ; src
- .text:080C750A mov [esp], eax ; int
- .text:080C750D call sub_80A8670
- .text:080C7512 mov [esp+4], eax ; s2
- .text:080C7516 mov edx, [ebp+ptr]
- .text:080C7519 mov [esp], edx ; s1
- .text:080C751C call _strcmp
- .text:080C7521 test eax, eax
- .text:080C7523 jnz loc_80C7C3D
- .text:080C7529 mov eax, [ebp+n]
- .text:080C752C add eax, 0Fh
- .text:080C752F cmp ebx, eax
- .text:080C7531 jl short loc_80C7599
- .text:080C7533 movzx edx, word ptr [edi]
- .text:080C7536 add edi, 2
- .text:080C7539 add eax, edx
- .text:080C753B mov [ebp+n], edx
- .text:080C753E cmp ebx, eax
- .text:080C7540 jl short loc_80C7599
- .text:080C7542 mov eax, [ebp+n]
- .text:080C7545 inc eax
- .text:080C7546 mov [esp], eax ; size
- .text:080C7549 call _malloc
- .text:080C754E mov [esp+4], edi ; src
- .text:080C7552 mov ebx, eax
- .text:080C7554 mov eax, [ebp+n]
- .text:080C7557 mov [esp], ebx ; dest
- .text:080C755A mov [esp+8], eax ; n
- .text:080C755E call _memcpy
- .text:080C7563 mov edx, [ebp+n]
- .text:080C7566 mov byte ptr [edx+ebx], 0
- .text:080C756A mov eax, ds:dword_8192F64
- .text:080C756F test eax, eax
- .text:080C7571 jz short loc_80C7591
- .text:080C7573 mov [esp], eax ; int
- .text:080C7576 mov edx, 1
- .text:080C757B mov ds:dword_81938D8, edx
- .text:080C7581 mov [esp+4], ebx ; src
- .text:080C7585 call sub_80A80B0
- .text:080C758A xor eax, eax
- .text:080C758C mov ds:dword_81938D8, eax
- .text:080C7591
- .text:080C7591 loc_80C7591: ; CODE XREF: sub_80C73A0+1D1j
- .text:080C7591 mov [esp], ebx ; ptr
- .text:080C7594 call _free
- .text:080C7599
- .text:080C7599 loc_80C7599: ; CODE XREF: sub_80C73A0+191j
- .text:080C7599 ; sub_80C73A0+1A0j ...
- .text:080C7599 mov ecx, [ebp+ptr]
- .text:080C759C mov [esp], ecx ; ptr
- .text:080C759F call _free
- .text:080C75A4
- .text:080C75A4 loc_80C75A4: ; CODE XREF: sub_80C73A0+FDj
- .text:080C75A4 ; sub_80C73A0+111j
- .text:080C75A4 xor edi, edi
- .text:080C75A6 xor esi, esi
- .text:080C75A8 mov ebx, 0FFFFFFFFh
- .text:080C75AD mov ds:n, edi
- .text:080C75B3 mov ds:src, esi
- .text:080C75B9 mov dword_8180854, ebx
- .text:080C75BF
- .text:080C75BF loc_80C75BF: ; CODE XREF: sub_80C73A0+52j
- .text:080C75BF ; sub_80C73A0+8Aj ...
- .text:080C75BF mov ecx, 1 ; default
- .text:080C75BF ; jumptable 080C7433 cases 2-5,7-12,14,16-20
- .text:080C75C4 jmp loc_80C73CE
- .text:080C75C9 ; ---------------------------------------------------------------------------
- .text:080C75C9
- .text:080C75C9 loc_80C75C9: ; CODE XREF: sub_80C73A0+93j
- .text:080C75C9 ; DATA XREF: .rodata:off_8147AD4o
- .text:080C75C9 mov eax, offset aQuery ; jumptable 080C7433 case 15
- .text:080C75CE mov [esp+4], eax ; src
- .text:080C75D2 mov eax, ds:dword_8192F64
- .text:080C75D7 mov [esp], eax ; int
- .text:080C75DA call sub_80A84F0
- .text:080C75DF test al, al
- .text:080C75E1 mov ecx, 1
- .text:080C75E6 jz loc_80C73CE
- .text:080C75EC mov [esp], esi
- .text:080C75EF call sub_80C7240
- .text:080C75F4 test eax, eax
- .text:080C75F6 mov ecx, 1
- .text:080C75FB jnz loc_80C73CE
- .text:080C7601 mov [esp+8], edi ; int
- .text:080C7605 mov eax, 10h
- .text:080C760A mov edx, [ebp+fd]
- .text:080C760D mov [esp+10h], eax ; addr_len
- .text:080C7611 mov eax, offset addr
- .text:080C7616 mov [esp+0Ch], eax ; addr
- .text:080C761A mov eax, ds:dword_8192F64
- .text:080C761F mov [esp+4], edx ; fd
- .text:080C7623 mov [esp], eax ; int
- .text:080C7626 call sub_80A7A30
- .text:080C762B mov ecx, 1
- .text:080C7630 jmp loc_80C73CE
- .text:080C7635 ; ---------------------------------------------------------------------------
- .text:080C7635
- .text:080C7635 loc_80C7635: ; CODE XREF: sub_80C73A0+93j
- .text:080C7635 ; DATA XREF: .rodata:off_8147AD4o
- .text:080C7635 cmp ebx, 0Fh ; jumptable 080C7433 case 13
- .text:080C7638 jnz short loc_80C75BF ; default
- .text:080C7638 ; jumptable 080C7433 cases 2-5,7-12,14,16-20
- .text:080C763A mov [esp+4], edi ; buf
- .text:080C763E mov eax, 10h
- .text:080C7643 mov [esp+14h], eax ; addr_len
- .text:080C7647 mov eax, offset addr
- .text:080C764C mov [esp+10h], eax ; addr
- .text:080C7650 xor eax, eax
- .text:080C7652 mov [esp+0Ch], eax ; flags
- .text:080C7656 mov eax, 0Fh
- .text:080C765B mov [esp+8], eax ; n
- .text:080C765F mov eax, [ebp+fd]
- .text:080C7662 mov [esp], eax ; fd
- .text:080C7665 call _sendto
- .text:080C766A mov ecx, 1
- .text:080C766F jmp loc_80C73CE
- .text:080C7674 ; ---------------------------------------------------------------------------
- .text:080C7674
- .text:080C7674 loc_80C7674: ; CODE XREF: sub_80C73A0+93j
- .text:080C7674 ; DATA XREF: .rodata:off_8147AD4o
- .text:080C7674 mov eax, offset aQuery ; jumptable 080C7433 case 6
- .text:080C7679 mov [esp+4], eax ; src
- .text:080C767D mov eax, ds:dword_8192F64
- .text:080C7682 mov [esp], eax ; int
- .text:080C7685 call sub_80A84F0
- .text:080C768A test al, al
- .text:080C768C mov ecx, 1
- .text:080C7691 jz loc_80C73CE
- .text:080C7697 mov [esp], esi
- .text:080C769A call sub_80C7240
- .text:080C769F test eax, eax
- .text:080C76A1 mov ecx, 1
- .text:080C76A6 jnz loc_80C73CE
- .text:080C76AC mov eax, ds:dword_8192F64
- .text:080C76B1 mov ebx, offset aHostname ; "hostname"
- .text:080C76B6 mov [esp+4], ebx ; src
- .text:080C76BA mov [esp], eax ; int
- .text:080C76BD call sub_80A8670
- .text:080C76C2 mov [ebp+src], eax
- .text:080C76C5 mov [esp], eax ; s
- .text:080C76C8 call _strlen
- .text:080C76CD mov [ebp+var_48], eax
- .text:080C76D0 cmp eax, 32h
- .text:080C76D3 jbe short loc_80C76DC
- .text:080C76D5 mov [ebp+var_48], 32h
- .text:080C76DC
- .text:080C76DC loc_80C76DC: ; CODE XREF: sub_80C73A0+333j
- .text:080C76DC mov eax, ds:dword_8192F64
- .text:080C76E1 mov ecx, offset aGamemodetext ; "gamemodetext"
- .text:080C76E6 mov [esp+4], ecx ; src
- .text:080C76EA mov [esp], eax ; int
- .text:080C76ED call sub_80A8670
- .text:080C76F2 mov [ebp+var_4C], eax
- .text:080C76F5 mov [esp], eax ; s
- .text:080C76F8 call _strlen
- .text:080C76FD mov [ebp+var_50], eax
- .text:080C7700 cmp eax, 1Eh
- .text:080C7703 jbe short loc_80C770C
- .text:080C7705 mov [ebp+var_50], 1Eh
- .text:080C770C
- .text:080C770C loc_80C770C: ; CODE XREF: sub_80C73A0+363j
- .text:080C770C mov eax, ds:dword_8192F64
- .text:080C7711 mov edx, offset aMapname ; "mapname"
- .text:080C7716 mov [esp+4], edx ; src
- .text:080C771A mov [esp], eax ; int
- .text:080C771D call sub_80A8670
- .text:080C7722 mov [ebp+var_54], eax
- .text:080C7725 mov [esp], eax ; s
- .text:080C7728 call _strlen
- .text:080C772D mov [ebp+var_58], eax
- .text:080C7730 cmp eax, 1Eh
- .text:080C7733 jbe short loc_80C773C
- .text:080C7735 mov [ebp+var_58], 1Eh
- .text:080C773C
- .text:080C773C loc_80C773C: ; CODE XREF: sub_80C73A0+393j
- .text:080C773C mov word ptr [ebp+var_1C+2], 0
- .text:080C7742 mov eax, ds:dword_8192F68
- .text:080C7747 mov ecx, 1
- .text:080C774C mov esi, [eax+8]
- .text:080C774F test esi, esi
- .text:080C7751 jz loc_80C73CE
- .text:080C7757 mov [esp], esi
- .text:080C775A call sub_80C59A0
- .text:080C775F mov word ptr [ebp+var_1C+2], ax
- .text:080C7763 mov eax, offset aMaxplayers ; "maxplayers"
- .text:080C7768 mov [esp+4], eax ; src
- .text:080C776C mov eax, ds:dword_8192F64
- .text:080C7771 mov [esp], eax ; int
- .text:080C7774 call sub_80A8550
- .text:080C7779 mov [esp], esi
- .text:080C777C mov ebx, eax
- .text:080C777E call sub_80C5A10
- .text:080C7783 sub ebx, eax
- .text:080C7785 mov eax, offset aPassword ; "password"
- .text:080C778A mov [esp+4], eax ; src
- .text:080C778E mov eax, ds:dword_8192F64
- .text:080C7793 mov word ptr [ebp+var_1C], bx
- .text:080C7797 mov [esp], eax ; int
- .text:080C779A call sub_80A8670
- .text:080C779F cmp byte ptr [eax], 0
- .text:080C77A2 mov ecx, [ebp+var_50]
- .text:080C77A5 mov edx, [ebp+var_48]
- .text:080C77A8 setnz bl
- .text:080C77AB lea edx, [edx+ecx+1Ch]
- .text:080C77AF mov ecx, [ebp+var_58]
- .text:080C77B2 add edx, ecx
- .text:080C77B4 mov [ebp+var_5C], edx
- .text:080C77B7 mov [esp], edx ; size
- .text:080C77BA call _malloc
- .text:080C77BF mov esi, eax
- .text:080C77C1 mov eax, [edi]
- .text:080C77C3 mov [esi], eax
- .text:080C77C5 mov eax, [edi+4]
- .text:080C77C8 mov [esi+4], eax
- .text:080C77CB movzx eax, word ptr [edi+8]
- .text:080C77CF mov [esi+8], ax
- .text:080C77D3 movzx eax, byte ptr [edi+0Ah]
- .text:080C77D7 xor edi, edi
- .text:080C77D9 mov [esi+0Bh], bl
- .text:080C77DC lea ebx, [esi+14h]
- .text:080C77DF mov [esi+0Ah], al
- .text:080C77E2 movzx eax, word ptr [ebp+var_1C+2]
- .text:080C77E6 mov [esi+0Ch], ax
- .text:080C77EA mov eax, [ebp+var_1C]
- .text:080C77ED mov [esi+0Eh], ax
- .text:080C77F1 mov eax, [ebp+var_48]
- .text:080C77F4 mov [esi+10h], eax
- .text:080C77F7 mov edx, [ebp+src]
- .text:080C77FA mov [esp], ebx ; dest
- .text:080C77FD mov [esp+8], eax ; n
- .text:080C7801 mov [esp+4], edx ; src
- .text:080C7805 call _memcpy
- .text:080C780A mov eax, [ebp+var_48]
- .text:080C780D mov ecx, [ebp+var_50]
- .text:080C7810 add ebx, eax
- .text:080C7812 mov [ebx], ecx
- .text:080C7814 mov eax, [ebp+var_4C]
- .text:080C7817 add ebx, 4
- .text:080C781A mov [esp+8], ecx ; n
- .text:080C781E mov [esp], ebx ; dest
- .text:080C7821 mov [esp+4], eax ; src
- .text:080C7825 call _memcpy
- .text:080C782A mov eax, [ebp+var_50]
- .text:080C782D mov edx, [ebp+var_58]
- .text:080C7830 add ebx, eax
- .text:080C7832 mov [ebx], edx
- .text:080C7834 mov ecx, [ebp+var_54]
- .text:080C7837 add ebx, 4
- .text:080C783A mov [esp+8], edx ; n
- .text:080C783E mov [esp], ebx ; dest
- .text:080C7841 mov [esp+4], ecx ; src
- .text:080C7845 call _memcpy
- .text:080C784A mov [esp+0Ch], edi ; flags
- .text:080C784E mov eax, 10h
- .text:080C7853 mov edx, [ebp+fd]
- .text:080C7856 mov [esp+14h], eax ; addr_len
- .text:080C785A mov eax, offset addr
- .text:080C785F mov [esp+10h], eax ; addr
- .text:080C7863 mov eax, [ebp+var_5C]
- .text:080C7866 mov [esp+4], esi ; buf
- .text:080C786A mov [esp], edx ; fd
- .text:080C786D mov [esp+8], eax ; n
- .text:080C7871 call _sendto
- .text:080C7876 mov [esp], esi ; ptr
- .text:080C7879
- .text:080C7879 loc_80C7879: ; CODE XREF: sub_80C73A0+860j
- .text:080C7879 call _free
- .text:080C787E mov ecx, 1
- .text:080C7883 jmp loc_80C73CE
- .text:080C7888 ; ---------------------------------------------------------------------------
- .text:080C7888
- .text:080C7888 loc_80C7888: ; CODE XREF: sub_80C73A0+93j
- .text:080C7888 ; DATA XREF: .rodata:off_8147AD4o
- .text:080C7888 mov eax, offset aQuery ; jumptable 080C7433 case 1
- .text:080C788D mov [esp+4], eax ; src
- .text:080C7891 mov eax, ds:dword_8192F64
- .text:080C7896 mov [esp], eax ; int
- .text:080C7899 call sub_80A84F0
- .text:080C789E test al, al
- .text:080C78A0 mov ecx, 1
- .text:080C78A5 jz loc_80C73CE
- .text:080C78AB mov [esp], esi
- .text:080C78AE call sub_80C7240
- .text:080C78B3 test eax, eax
- .text:080C78B5 mov ecx, 1
- .text:080C78BA jnz loc_80C73CE
- .text:080C78C0 mov word ptr [ebp+var_20], 0
- .text:080C78C6 mov eax, ds:dword_8192F68
- .text:080C78CB mov eax, [eax+8]
- .text:080C78CE mov [ebp+var_70], eax
- .text:080C78D1 test eax, eax
- .text:080C78D3 jz loc_80C73CE
- .text:080C78D9 mov [esp], eax
- .text:080C78DC call sub_80C59A0
- .text:080C78E1 mov word ptr [ebp+var_20], ax
- .text:080C78E5 cmp ax, 64h
- .text:080C78E9 mov ecx, 1
- .text:080C78EE ja loc_80C73CE
- .text:080C78F4 movzx edx, ax
- .text:080C78F7 xor esi, esi
- .text:080C78F9 mov eax, edx
- .text:080C78FB shl eax, 4
- .text:080C78FE add eax, edx
- .text:080C7900 lea eax, [eax+eax+0Dh]
- .text:080C7904 mov [esp], eax ; size
- .text:080C7907 call _malloc
- .text:080C790C mov [ebp+var_74], eax
- .text:080C790F mov eax, [edi]
- .text:080C7911 mov edx, [ebp+var_74]
- .text:080C7914 mov [edx], eax
- .text:080C7916 mov eax, [edi+4]
- .text:080C7919 mov [edx+4], eax
- .text:080C791C movzx eax, word ptr [edi+8]
- .text:080C7920 mov [edx+8], ax
- .text:080C7924 movzx eax, byte ptr [edi+0Ah]
- .text:080C7928 mov edi, edx
- .text:080C792A add edi, 0Dh
- .text:080C792D mov [edx+0Ah], al
- .text:080C7930 mov eax, [ebp+var_20]
- .text:080C7933 mov [edx+0Bh], ax
- .text:080C7937 xor eax, eax
- .text:080C7939 jmp short loc_80C7950
- .text:080C7939 ; ---------------------------------------------------------------------------
- .text:080C793B align 10h
- .text:080C7940
- .text:080C7940 loc_80C7940: ; CODE XREF: sub_80C73A0+5B7j
- .text:080C7940 ; sub_80C73A0+5C5j ...
- .text:080C7940 lea eax, [esi+1]
- .text:080C7943 cmp eax, 1F3h
- .text:080C7948 mov esi, eax
- .text:080C794A jg loc_80C7C05
- .text:080C7950
- .text:080C7950 loc_80C7950: ; CODE XREF: sub_80C73A0+599j
- .text:080C7950 movzx eax, ax
- .text:080C7953 cmp ax, 1F3h
- .text:080C7957 ja short loc_80C7940
- .text:080C7959 mov ecx, [ebp+var_70]
- .text:080C795C mov ebx, [ecx+eax*4+12504h]
- .text:080C7963 test ebx, ebx
- .text:080C7965 jz short loc_80C7940
- .text:080C7967 movzx eax, si
- .text:080C796A mov edx, [ecx+eax*4+16D48h]
- .text:080C7971 mov [ebp+var_7C], eax
- .text:080C7974 test edx, edx
- .text:080C7976 jnz short loc_80C7940
- .text:080C7978 mov [esp+4], eax
- .text:080C797C mov [esp], ecx
- .text:080C797F call sub_80C5980
- .text:080C7984 test al, al
- .text:080C7986 jz short loc_80C7940
- .text:080C7988 mov edx, esi
- .text:080C798A mov [edi], dl
- .text:080C798C inc edi
- .text:080C798D cmp word ptr [ebp+var_7C], 1F3h
- .text:080C7993 mov [ebp+s], 0
- .text:080C799A ja short loc_80C79B2
- .text:080C799C mov ecx, [ebp+var_7C]
- .text:080C799F mov edx, [ebp+var_70]
- .text:080C79A2 lea eax, [ecx+ecx*4]
- .text:080C79A5 lea eax, [eax+eax*4]
- .text:080C79A8 lea eax, [eax+edx+134A4h]
- .text:080C79AF mov [ebp+s], eax
- .text:080C79B2
- .text:080C79B2 loc_80C79B2: ; CODE XREF: sub_80C73A0+5FAj
- .text:080C79B2 mov ecx, [ebp+s]
- .text:080C79B5 mov [esp], ecx ; s
- .text:080C79B8 call _strlen
- .text:080C79BD mov [edi], al
- .text:080C79BF movzx ebx, al
- .text:080C79C2 mov eax, [ebp+s]
- .text:080C79C5 mov [esp+8], ebx ; n
- .text:080C79C9 inc edi
- .text:080C79CA mov [esp], edi ; dest
- .text:080C79CD add edi, ebx
- .text:080C79CF mov [esp+4], eax ; src
- .text:080C79D3 call _memcpy
- .text:080C79D8 xor eax, eax
- .text:080C79DA cmp word ptr [ebp+var_7C], 1F3h
- .text:080C79E0 ja short loc_80C79EF
- .text:080C79E2 mov edx, [ebp+var_7C]
- .text:080C79E5 mov ecx, [ebp+var_70]
- .text:080C79E8 mov eax, [ecx+edx*4+7DCh]
- .text:080C79EF
- .text:080C79EF loc_80C79EF: ; CODE XREF: sub_80C73A0+640j
- .text:080C79EF mov [edi], eax
- .text:080C79F1 mov eax, ds:dword_81930A8
- .text:080C79F6 add edi, 4
- .text:080C79F9 mov edx, [eax]
- .text:080C79FB mov [esp+4], eax
- .text:080C79FF lea eax, [ebp+var_38]
- .text:080C7A02 mov [esp], eax
- .text:080C7A05 mov [esp+8], esi
- .text:080C7A09 call dword ptr [edx+0ECh]
- .text:080C7A0F mov edx, ds:dword_81930A8
- .text:080C7A15 mov eax, [ebp+var_38]
- .text:080C7A18 sub esp, 4
- .text:080C7A1B mov ecx, [edx]
- .text:080C7A1D mov [esp+4], eax
- .text:080C7A21 mov eax, [ebp+var_34]
- .text:080C7A24 mov [esp], edx
- .text:080C7A27 mov [esp+8], ax
- .text:080C7A2C call dword ptr [ecx+50h]
- .text:080C7A2F mov [edi], eax
- .text:080C7A31 add edi, 4
- .text:080C7A34 jmp loc_80C7940
- .text:080C7A39 ; ---------------------------------------------------------------------------
- .text:080C7A39
- .text:080C7A39 loc_80C7A39: ; CODE XREF: sub_80C73A0+93j
- .text:080C7A39 ; DATA XREF: .rodata:off_8147AD4o
- .text:080C7A39 mov eax, ds:dword_8192F64 ; jumptable 080C7433 case 0
- .text:080C7A3E mov ebx, offset aQuery ; "query"
- .text:080C7A43 mov [esp+4], ebx ; src
- .text:080C7A47 mov [esp], eax ; int
- .text:080C7A4A call sub_80A84F0
- .text:080C7A4F test al, al
- .text:080C7A51 mov ecx, 1
- .text:080C7A56 jz loc_80C73CE
- .text:080C7A5C mov [esp], esi
- .text:080C7A5F call sub_80C7240
- .text:080C7A64 test eax, eax
- .text:080C7A66 mov ecx, 1
- .text:080C7A6B jnz loc_80C73CE
- .text:080C7A71 mov word ptr [ebp+var_20+2], 0
- .text:080C7A77 mov eax, ds:dword_8192F68
- .text:080C7A7C mov eax, [eax+8]
- .text:080C7A7F mov [ebp+var_60], eax
- .text:080C7A82 test eax, eax
- .text:080C7A84 jz loc_80C73CE
- .text:080C7A8A mov [esp], eax
- .text:080C7A8D call sub_80C59A0
- .text:080C7A92 mov word ptr [ebp+var_20+2], ax
- .text:080C7A96 cmp ax, 64h
- .text:080C7A9A mov ecx, 1
- .text:080C7A9F ja loc_80C73CE
- .text:080C7AA5 movzx edx, ax
- .text:080C7AA8 lea eax, ds:0[edx*8]
- .text:080C7AAF sub eax, edx
- .text:080C7AB1 lea eax, [edx+eax*4+0Dh]
- .text:080C7AB5 mov [esp], eax ; size
- .text:080C7AB8 call _malloc
- .text:080C7ABD mov [ebp+var_68], eax
- .text:080C7AC0 mov eax, [edi]
- .text:080C7AC2 mov ecx, [ebp+var_68]
- .text:080C7AC5 mov [ecx], eax
- .text:080C7AC7 mov eax, [edi+4]
- .text:080C7ACA mov [ecx+4], eax
- .text:080C7ACD movzx eax, word ptr [edi+8]
- .text:080C7AD1 mov [ecx+8], ax
- .text:080C7AD5 movzx eax, byte ptr [edi+0Ah]
- .text:080C7AD9 xor edi, edi
- .text:080C7ADB mov [ecx+0Ah], al
- .text:080C7ADE movzx eax, word ptr [ebp+var_20+2]
- .text:080C7AE2 mov [ecx+0Bh], ax
- .text:080C7AE6 add ecx, 0Dh
- .text:080C7AE9 mov [ebp+var_64], ecx
- .text:080C7AEC jmp short loc_80C7AFD
- .text:080C7AEC ; ---------------------------------------------------------------------------
- .text:080C7AEE align 10h
- .text:080C7AF0
- .text:080C7AF0 loc_80C7AF0: ; CODE XREF: sub_80C73A0+765j
- .text:080C7AF0 ; sub_80C73A0+773j ...
- .text:080C7AF0 inc edi
- .text:080C7AF1 cmp edi, 1F3h
- .text:080C7AF7 jg loc_80C7BC6
- .text:080C7AFD
- .text:080C7AFD loc_80C7AFD: ; CODE XREF: sub_80C73A0+74Cj
- .text:080C7AFD movzx esi, di
- .text:080C7B00 cmp si, 1F3h
- .text:080C7B05 ja short loc_80C7AF0
- .text:080C7B07 mov eax, [ebp+var_60]
- .text:080C7B0A mov ecx, [eax+esi*4+12504h]
- .text:080C7B11 test ecx, ecx
- .text:080C7B13 jz short loc_80C7AF0
- .text:080C7B15 mov edx, [eax+esi*4+16D48h]
- .text:080C7B1C test edx, edx
- .text:080C7B1E jnz short loc_80C7AF0
- .text:080C7B20 mov [esp+4], esi
- .text:080C7B24 mov [esp], eax
- .text:080C7B27 call sub_80C5980
- .text:080C7B2C test al, al
- .text:080C7B2E jz short loc_80C7AF0
- .text:080C7B30 mov [ebp+var_6C], 0
- .text:080C7B37 cmp si, 1F3h
- .text:080C7B3C ja short loc_80C7B51
- .text:080C7B3E mov edx, [ebp+var_60]
- .text:080C7B41 lea eax, [esi+esi*4]
- .text:080C7B44 lea eax, [eax+eax*4]
- .text:080C7B47 lea eax, [eax+edx+134A4h]
- .text:080C7B4E mov [ebp+var_6C], eax
- .text:080C7B51
- .text:080C7B51 loc_80C7B51: ; CODE XREF: sub_80C73A0+79Cj
- .text:080C7B51 mov ecx, [ebp+var_6C]
- .text:080C7B54 mov [esp], ecx ; s
- .text:080C7B57 call _strlen
- .text:080C7B5C mov ecx, [ebp+var_64]
- .text:080C7B5F movzx ebx, al
- .text:080C7B62 mov [ecx], al
- .text:080C7B64 mov eax, [ebp+var_6C]
- .text:080C7B67 inc ecx
- .text:080C7B68 mov [ebp+var_64], ecx
- .text:080C7B6B mov [esp+8], ebx ; n
- .text:080C7B6F mov [esp+4], eax ; src
- .text:080C7B73 mov [esp], ecx ; dest
- .text:080C7B76 call _memcpy
- .text:080C7B7B add [ebp+var_64], ebx
- .text:080C7B7E xor eax, eax
- .text:080C7B80 cmp si, 1F3h
- .text:080C7B85 ja short loc_80C7B91
- .text:080C7B87 mov edx, [ebp+var_60]
- .text:080C7B8A mov eax, [edx+esi*4+7DCh]
- .text:080C7B91
- .text:080C7B91 loc_80C7B91: ; CODE XREF: sub_80C73A0+7E5j
- .text:080C7B91 mov ecx, [ebp+var_64]
- .text:080C7B94 mov [ecx], eax
- .text:080C7B96 add ecx, 4
- .text:080C7B99 mov [ebp+var_64], ecx
- .text:080C7B9C jmp loc_80C7AF0
- .text:080C7BA1 ; ---------------------------------------------------------------------------
- .text:080C7BA1
- .text:080C7BA1 loc_80C7BA1: ; CODE XREF: sub_80C73A0+7Cj
- .text:080C7BA1 mov [esp], esi ; in
- .text:080C7BA4 call _inet_ntoa
- .text:080C7BA9 mov [esp+8], eax
- .text:080C7BAD movsx eax, byte ptr [edi+0Ah]
- .text:080C7BB1 mov dword ptr [esp], offset aQueryCFromS ; "[query:%c] from %s"
- .text:080C7BB8 mov [esp+4], eax ; arg
- .text:080C7BBC call sub_80B0840
- .text:080C7BC1 jmp loc_80C7422
- .text:080C7BC6 ; ---------------------------------------------------------------------------
- .text:080C7BC6
- .text:080C7BC6 loc_80C7BC6: ; CODE XREF: sub_80C73A0+757j
- .text:080C7BC6 mov eax, 10h
- .text:080C7BCB mov ecx, [ebp+fd]
- .text:080C7BCE mov [esp+14h], eax ; addr_len
- .text:080C7BD2 mov eax, offset addr
- .text:080C7BD7 mov [esp+10h], eax ; addr
- .text:080C7BDB xor eax, eax
- .text:080C7BDD mov [esp+0Ch], eax ; flags
- .text:080C7BE1 mov eax, [ebp+var_68]
- .text:080C7BE4 sub [ebp+var_64], eax
- .text:080C7BE7 mov [esp], ecx ; fd
- .text:080C7BEA mov [esp+4], eax ; buf
- .text:080C7BEE mov edx, [ebp+var_64]
- .text:080C7BF1 mov [esp+8], edx ; n
- .text:080C7BF5 call _sendto
- .text:080C7BFA mov eax, [ebp+var_68]
- .text:080C7BFD
- .text:080C7BFD loc_80C7BFD: ; CODE XREF: sub_80C73A0+89Bj
- .text:080C7BFD mov [esp], eax
- .text:080C7C00 jmp loc_80C7879
- .text:080C7C05 ; ---------------------------------------------------------------------------
- .text:080C7C05
- .text:080C7C05 loc_80C7C05: ; CODE XREF: sub_80C73A0+5AAj
- .text:080C7C05 mov edx, [ebp+var_74]
- .text:080C7C08 xor ecx, ecx
- .text:080C7C0A mov esi, 10h
- .text:080C7C0F mov [esp+0Ch], ecx ; flags
- .text:080C7C13 mov ecx, [ebp+fd]
- .text:080C7C16 mov ebx, offset addr
- .text:080C7C1B mov [esp+14h], esi ; addr_len
- .text:080C7C1F sub edi, edx
- .text:080C7C21 mov edx, [ebp+var_74]
- .text:080C7C24 mov [esp+10h], ebx ; addr
- .text:080C7C28 mov [esp+8], edi ; n
- .text:080C7C2C mov [esp+4], edx ; buf
- .text:080C7C30 mov [esp], ecx ; fd
- .text:080C7C33 call _sendto
- .text:080C7C38 mov eax, [ebp+var_74]
- .text:080C7C3B jmp short loc_80C7BFD
- .text:080C7C3D ; ---------------------------------------------------------------------------
- .text:080C7C3D
- .text:080C7C3D loc_80C7C3D: ; CODE XREF: sub_80C73A0+183j
- .text:080C7C3D mov [esp], esi ; in
- .text:080C7C40 call _inet_ntoa
- .text:080C7C45 mov [esp+4], eax ; arg
- .text:080C7C49 mov dword ptr [esp], offset aBadRconAttempt ; "BAD RCON ATTEMPT BY: %s"
- .text:080C7C50 call sub_80B0840
- .text:080C7C55 mov dword ptr [esp], offset aInvalidRconPas ; "Invalid RCON password."
- .text:080C7C5C mov eax, 1
- .text:080C7C61 mov ds:dword_81938D8, eax
- .text:080C7C66 call sub_80C72B0
- .text:080C7C6B xor eax, eax
- .text:080C7C6D mov ds:dword_81938D8, eax
- .text:080C7C72 jmp loc_80C7599
- .text:080C7C72 sub_80C73A0 endp
- .text:080C7C72
- .text:080C7C72 ; ---------------------------------------------------------------------------
- .text:080C7C77 align 10h
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement