Function at 0x497615
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x6c
push ebx
push ebp
push esi
push edi
mov ebp, ecx
mov eax, edx
push 0xc
xor ebx, ebx
mov dword [esp + 0x24], eax
pop ecx
mov edi, dword [ebp + eax*4 + 0x178]
mov dword [esp + 0x24], ebp
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x5c], ebx
mov dword [esp + 0x54], ebx
mov dword [esp + 0x40], ebx
cmp dword [esp + 0x84], ecx
jl 0x4990f7
test edi, edi
je 0x4990f7
mov eax, dword [esp + 0x80]
xor ecx, ecx
push dword [esp + 0x84]
mov edx, eax
mov esi, dword [eax + 8]
mov dword [eax + 8], ebx
call fcn.0049c11d
pop ecx
cmp esi, eax
jne 0x4990f7
cmp dword [edi + 0xf8], ebx
je 0x4976bc
mov dword [edi + 0xf8], ebx
lea edx, [edi + 1]
mov ecx, dword [ebp + 0x28]
call fcn.0048acf1
mov ecx, dword [ebp + 0x28]
lea edx, [edi + 1]
push ebx
push 0x10ad
push 0x742fd0
push ebx
push 0x493f54
push 0x3a98
call fcn.0048a8a3
add esp, 0x18
lea esi, [edi + 0x7c]
mov ecx, esi
mov dword [esp + 0x50], esi
call fcn.0044cfd4
mov ecx, dword [esp + 0x80]
mov eax, dword [ecx + 4]
cmp dword [edi + 0x54], eax
je 0x4976e1
test eax, eax
jne 0x4990f5
mov edx, dword [edi + 0xec]
lea ebp, [ecx + 0xc]
mov dword [esp + 0x2c], edx
mov dword [edx + 8], ebx
mov dword [edx + 4], ebx
mov dword [edx], ebx
mov dword [edi + 0xf0], 0xc
test ebp, ebp
je 0x4990b4
mov edx, dword [esp + 0x1c]
lea eax, [edx + 4]
cmp eax, dword [esp + 0x84]
jg 0x4990b0
cmp dword [esp + 0x5c], 0
jne 0x4990b0
mov al, byte [ebp]
mov byte [esp + 0x16], al
mov al, byte [ebp + 1]
mov byte [esp + 0x44], al
movzx eax, word [ebp + 2]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
movzx esi, ax
push 4
pop eax
cmp si, ax
jb 0x4990ad
mov ecx, dword [esp + 0x1c]
mov eax, esi
mov dword [esp + 0x34], eax
add eax, ecx
cmp eax, dword [esp + 0x84]
jg 0x4990ad
movzx eax, byte [esp + 0x16]
mov edx, 0x82
cmp eax, edx
ja 0x498ede
je 0x4987c0
cmp eax, 0xb
ja case.default.0x497789
jmp dword [eax*4 + 0x499101]
mov ebp, dword [esp + 0x24]
cmp dword [ebp + 0x13c], ebx
je case.0x497789.2
cmp dword [edi + 0x78], 1
jne case.0x497789.2
push 1
push edi
mov dword [edi + 0x78], 2
push ebp
mov dword [edi + 0x7c], ebx
call dword [ebp + 0x13c]
mov eax, dword [esp + 0x2c]
add esp, 0xc
mov eax, dword [ebp + eax*4 + 0x178]
test eax, eax
je 0x4990f7
cmp dword [eax + 0x78], ebx
je 0x4990f7
lea ecx, [edi + 0x7c]
call fcn.0044cfd4
mov ecx, dword [esp + 0x1c]
push 0x14
pop eax
cmp si, ax
jb 0x498fca
cmp dword [esp + 0x20], 0xffffffff
je 0x498fca
cmp dword [edi + 0x78], 1
jne 0x498fca
mov esi, dword [esp + 0x80]
push dword [ecx + esi + 0x10]
call dword [sym.imp.WS2_32.dll_ntohl]
dec eax
mov ebp, ebx
push 0x14
mov dword [edi + 0x68], eax
mov dword [edi + 0x6c], eax
mov dword [edi + 0xa4], eax
pop eax
mov dword [esp + 0x4c], ebp
cmp dword [esp + 0x34], eax
jbe 0x498fca
mov eax, dword [esp + 0x1c]
add eax, esi
mov dword [esp + 0x48], eax
movzx eax, word [eax + ebp + 0x14]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
movzx esi, ax
mov eax, dword [esp + 0x48]
movzx eax, word [eax + ebp + 0x16]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
movzx ecx, ax
mov dword [esp + 0x3c], ecx
cmp esi, 7
je 0x4978d3
cmp esi, 0x8008
je 0x497892
mov eax, 0xc000
cmp esi, eax
jne 0x49793b
mov ecx, dword [edi + 0x88]
mov edx, eax
push 1
call fcn.0048b968
pop ecx
jmp 0x497937
movzx eax, cx
mov esi, ebx
add eax, 0xfffffffc
mov dword [esp + 0x58], eax
test eax, eax
jle 0x49793b
add ebp, dword [esp + 0x1c]
mov ebx, eax
add ebp, dword [esp + 0x80]
movzx edx, byte [esi + ebp + 0x18]
mov ecx, dword [edi + 0x88]
push 1
call fcn.0048b968
inc esi
pop ecx
cmp esi, ebx
jl 0x4978b3
mov ebp, dword [esp + 0x4c]
xor ebx, ebx
jmp 0x497937
mov edx, dword [edi + 0xf0]
push ecx
mov ecx, dword [esp + 0x30]
push ebx
push 0xa
call fcn.00495f62
mov ecx, dword [esp + 0x48]
add esp, 0xc
movzx esi, cx
mov edx, 0x1000
sub edx, eax
mov dword [edi + 0xf0], eax
lea ecx, [esi - 4]
push ecx
mov ecx, dword [esp + 0x4c]
add ecx, 0x18
add ecx, ebp
push ecx
mov ecx, dword [esp + 0x34]
add ecx, eax
call section..text
pop ecx
pop ecx
mov eax, esi
push 4
and eax, 3
pop ecx
sub ecx, eax
and ecx, reloc.WS2_32.dll_closesocket
jns 0x49792f
dec ecx
or ecx, 0xfffffffc
inc ecx
add ecx, esi
add dword [edi + 0xf0], ecx
mov ecx, dword [esp + 0x3c]
movzx edx, cx
mov eax, edx
push 4
and eax, 3
pop ecx
sub ecx, eax
and ecx, reloc.WS2_32.dll_closesocket
jns 0x497955
dec ecx
or ecx, 0xfffffffc
inc ecx
mov eax, dword [esp + 0x34]
add ecx, edx
add ebp, ecx
sub eax, ebp
mov dword [esp + 0x4c], ebp
cmp eax, 0x14
mov eax, dword [esp + 0x48]
jg 0x49783d
jmp 0x498fca
push 0x14
pop eax
cmp si, ax
jb 0x498fca
mov eax, dword [esp + 0x20]
cmp eax, 0xffffffff
je 0x498fca
cmp dword [edi + 0x78], 1
jne 0x498fca
mov ebp, dword [esp + 0x80]
mov dword [edi + 0x40], eax
mov eax, dword [ecx + ebp + 4]
mov dword [edi + 0x54], eax
test eax, eax
je 0x499008
push dword [ecx + ebp + 8]
mov esi, dword [sym.imp.WS2_32.dll_ntohl]
call esi
mov dword [edi + 0x58], eax
mov eax, dword [esp + 0x1c]
push dword [eax + ebp + 0x10]
call esi
dec eax
lea esi, [edi + 0x64]
push 4
mov dword [edi + 0x68], eax
mov dword [edi + 0x6c], eax
pop eax
push eax
push esi
call fcn.004bf9b0
mov eax, dword [esi]
mov esi, dword [sym.imp.WS2_32.dll_ntohs]
mov dword [edi + 0xa0], eax
mov eax, dword [edi + 0x68]
pop ecx
mov dword [edi + 0xa4], eax
movzx eax, word [ebp + 2]
pop ecx
push eax
call esi
mov word [edi + 0x50], ax
movzx eax, word [ebp]
push eax
call esi
mov word [edi + 0x52], ax
mov eax, dword [esp + 0x1c]
movzx eax, word [eax + ebp + 0xc]
push eax
call esi
mov ecx, 0x400
cmp ax, cx
jae 0x497a34
mov eax, dword [esp + 0x1c]
movzx eax, word [eax + ebp + 0xc]
push eax
call esi
movzx eax, ax
jmp 0x497a36
mov eax, ecx
mov word [edi + 0x92], ax
mov eax, dword [esp + 0x1c]
movzx eax, word [eax + ebp + 0xe]
push eax
call esi
mov ecx, 0x400
cmp ax, cx
jae 0x497a64
mov eax, dword [esp + 0x1c]
movzx eax, word [eax + ebp + 0xe]
push eax
call esi
movzx eax, ax
jmp 0x497a66
mov eax, ecx
push 0x14
mov word [edi + 0x90], ax
mov esi, ebx
pop eax
mov dword [esp + 0x48], esi
cmp dword [esp + 0x34], eax
jbe 0x497b50
lea eax, [ebp + 0x14]
add eax, dword [esp + 0x1c]
mov dword [esp + 0x3c], eax
movzx eax, word [eax + esi]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
movzx ebp, ax
mov eax, dword [esp + 0x1c]
add eax, dword [esp + 0x80]
movzx eax, word [eax + esi + 0x16]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
movzx ecx, ax
mov dword [esp + 0x4c], ecx
cmp ebp, 0x8008
je 0x497ada
mov eax, 0xc000
cmp ebp, eax
jne 0x497b19
mov ecx, dword [edi + 0x88]
mov edx, eax
push 1
call fcn.0048b968
pop ecx
jmp 0x497b15
movzx eax, cx
mov ebp, ebx
add eax, 0xfffffffc
mov dword [esp + 0x58], eax
test eax, eax
jle 0x497b19
add esi, dword [esp + 0x1c]
mov ebx, eax
add esi, dword [esp + 0x80]
movzx edx, byte [esi + ebp + 0x18]
mov ecx, dword [edi + 0x88]
push 1
call fcn.0048b968
inc ebp
pop ecx
cmp ebp, ebx
jl 0x497af7
mov esi, dword [esp + 0x48]
xor ebx, ebx
mov ecx, dword [esp + 0x4c]
movzx edx, cx
mov eax, edx
push 4
and eax, 3
pop ecx
sub ecx, eax
and ecx, reloc.WS2_32.dll_closesocket
jns 0x497b33
dec ecx
or ecx, 0xfffffffc
inc ecx
mov eax, dword [esp + 0x34]
add ecx, edx
add esi, ecx
push 0x14
sub eax, esi
mov dword [esp + 0x4c], esi
pop ecx
cmp eax, ecx
mov eax, dword [esp + 0x3c]
jg 0x497a8b
call dword [sym.imp.KERNEL32.dll_GetTickCount64]
mov esi, dword [esp + 0x2c]
mov ecx, esi
push 0x25
mov dword [esp + 0x7c], edx
mov edx, dword [edi + 0xf0]
push ebx
push 2
mov dword [esp + 0x80], eax
mov byte [esp + 0x23], 0x82
call fcn.00495f62
mov ebp, dword [sym.imp.WS2_32.dll_htonl]
add esp, 0xc
push 4
pop eax
add dword [edi + 0xf0], eax
mov ecx, dword [edi + 0xf0]
mov eax, dword [edi + 0x54]
push 0x186a0
mov dword [ecx + esi], eax
call ebp
mov ecx, dword [edi + 0xf0]
mov dword [esi + ecx + 4], eax
movzx eax, word [edi + 0x92]
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov ecx, dword [edi + 0xf0]
mov word [esi + ecx + 8], ax
movzx eax, word [edi + 0x90]
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov ecx, dword [edi + 0xf0]
mov word [esi + ecx + 0xa], ax
push dword [edi + 0x64]
call ebp
mov ecx, dword [edi + 0xf0]
mov ebp, dword [sym.imp.WS2_32.dll_htons]
push 8
mov dword [esi + ecx + 0xc], eax
lea eax, [esp + 0x78]
add dword [edi + 0xf0], 0x10
push eax
push 7
call ebp
mov ecx, dword [edi + 0xf0]
mov edx, eax
add ecx, esi
call fcn.0049713d
add dword [edi + 0xf0], eax
lea eax, [esp + 0x1f]
pop ecx
pop ecx
push 1
push eax
push 0x8008
call ebp
mov ecx, dword [edi + 0xf0]
mov edx, eax
add ecx, esi
call fcn.0049713d
pop ecx
pop ecx
add dword [edi + 0xf0], eax
jmp 0x498fca
mov esi, dword [esp + 0x80]
mov dword [esp + 0x18], ebx
mov dword [esp + 0x38], ebx
push dword [esi + ecx + 4]
call dword [sym.imp.WS2_32.dll_ntohl]
mov ebp, eax
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x48], ebp
movzx ecx, word [esi + eax + 0xc]
push ecx
call dword [sym.imp.WS2_32.dll_ntohs]
movzx eax, ax
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x1c]
movzx ecx, word [eax + esi + 0xe]
push ecx
call dword [sym.imp.WS2_32.dll_ntohs]
movzx esi, ax
mov eax, dword [edi + 0xc4]
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x58], ebx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x4c], ebx
mov dword [esp + 0x60], eax
mov dword [edi + 0xac], ebx
call dword [sym.imp.KERNEL32.dll_GetTickCount64]
mov dword [edi + 0xb0], eax
mov eax, dword [edi + 0xa8]
test eax, eax
je 0x497cce
cmp ebp, eax
jb 0x497cce
mov dword [edi + 0xa8], ebx
mov ebp, esi
test ebp, ebp
je 0x497d02
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x30]
add ecx, 0x10
movzx esi, ax
lea esi, [ecx + esi*4]
add esi, dword [esp + 0x80]
push dword [esi]
call dword [sym.imp.WS2_32.dll_ntohl]
mov dword [esp + 0x3c], eax
lea esi, [esi + 4]
sub ebp, 1
jne 0x497cec
jmp 0x497d06
mov eax, dword [esp + 0x3c]
mov ecx, dword [edi + 0xc8]
test ecx, ecx
je 0x497d1d
push dword [ecx + 0x22]
call dword [sym.imp.WS2_32.dll_ntohl]
mov dword [esp + 0x3c], eax
mov ebp, dword [esp + 0x4c]
cmp dword [edi + 0xc8], ebx
je 0x497e98
cmp eax, dword [esp + 0x48]
ja 0x497e7b
mov eax, dword [edi + 0xc8]
cmp byte [eax + 6], 0
jne 0x497e0e
cmp dword [esp + 0x54], 0
jne 0x497e0e
mov eax, dword [eax + 0xe]
cmp dword [edi + 0xb4], eax
jae 0x497e0e
mov ecx, dword [edi + 0xb0]
sub ecx, eax
js 0x497e0e
mov eax, dword [edi + 0x110]
movd xmm0, dword [edi + 0x114]
sub eax, ecx
cdq
xor eax, edx
sub eax, edx
cvtdq2pd xmm0, xmm0
movd xmm1, eax
mulsd xmm0, qword [0x6c03e8]
cvtdq2pd xmm1, xmm1
mulsd xmm1, qword [0x6c03d8]
addsd xmm1, xmm0
movd xmm0, dword [edi + 0x110]
cvtdq2pd xmm0, xmm0
cvttsd2si eax, xmm1
mulsd xmm0, qword [0x6c03f0]
mov dword [edi + 0x114], eax
movd xmm1, ecx
cvtdq2pd xmm1, xmm1
mulsd xmm1, qword [0x6c03d0]
addsd xmm1, xmm0
cvttsd2si ecx, xmm1
mov dword [edi + 0x110], ecx
lea eax, [ecx + eax*4]
mov ecx, 0x3e8
cmp eax, ecx
cmovl eax, ecx
mov dword [edi + 0x118], eax
mov eax, 0x1770
cmp dword [edi + 0x118], eax
jle 0x497e06
mov dword [edi + 0x118], eax
mov dword [esp + 0x54], 1
mov eax, dword [edi + 0xc8]
add ebp, 0xffffffe4
mov esi, dword [edi + 0xc8]
push 0x1c
movzx ecx, word [eax + 4]
pop eax
sub eax, ecx
add ebp, ecx
add dword [edi + 0xc4], eax
mov eax, 0xffff
add word [edi + 0xc0], ax
mov eax, dword [esi]
mov dword [edi + 0xc8], eax
test eax, eax
jne 0x497e4e
mov dword [edi + 0xcc], ebx
jmp 0x497e5b
push dword [eax + 0x22]
call dword [sym.imp.WS2_32.dll_ntohl]
mov dword [esp + 0x3c], eax
push 1
push esi
call fcn.005ed680
mov eax, dword [esp + 0x44]
pop ecx
mov dword [edi + 0xbc], ebx
pop ecx
cmp dword [edi + 0xc8], ebx
jne 0x497d2d
test ebp, ebp
je 0x497e90
add dword [edi + 0x5c], ebp
add dword [edi + 0x58], ebp
mov eax, dword [edi + 0x60]
cmp dword [edi + 0x5c], eax
jle 0x497e90
mov dword [edi + 0x5c], eax
cmp dword [edi + 0xc8], ebx
jne 0x497eac
mov eax, dword [edi + 0x60]
mov dword [edi + 0x5c], eax
mov dword [edi + 0x108], ebx
mov dword [edi + 0x11c], ebx
jmp 0x497ec2
add dword [edi + 0x108], ebp
test ebp, ebp
jle 0x497ec2
mov eax, dword [edi + 0xb0]
mov dword [edi + 0x11c], eax
mov ecx, dword [edi + 0x60]
mov eax, dword [edi + 0x10c]
cmp ecx, eax
jg 0x497ef7
cmp dword [edi + 0xa8], ebx
jne 0x497ef3
test ebp, ebp
je 0x497ef3
cmp ecx, 0x186a0
jge 0x497ef3
mov edx, 0x578
cmp ebp, edx
mov eax, edx
cmovl eax, ebp
add eax, ecx
jmp 0x497f15
cmp ecx, eax
jle 0x497f18
mov edx, dword [edi + 0x108]
cmp edx, ecx
jl 0x497f18
cmp dword [esp + 0x60], ecx
jl 0x497f18
lea eax, [ecx + 0x578]
sub edx, eax
mov dword [edi + 0x108], edx
mov dword [edi + 0x60], eax
mov esi, dword [edi + 0xc8]
test esi, esi
je 0x498155
mov ebp, dword [esp + 0x80]
mov eax, dword [esp + 0x30]
add ebp, 0x12
add ebp, dword [esp + 0x1c]
movzx eax, ax
mov dword [esp + 0x30], eax
mov dword [esp + 0x4c], ebp
cmp dword [esp + 0x38], eax
jge 0x49813f
movzx eax, word [ebp - 2]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
movzx eax, ax
add eax, dword [esp + 0x48]
mov dword [esp + 0x3c], eax
movzx eax, word [ebp]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
push dword [esi + 0x22]
movzx eax, ax
add eax, dword [esp + 0x4c]
mov dword [esp + 0x64], eax
call dword [sym.imp.WS2_32.dll_ntohl]
mov ebp, dword [esp + 0x60]
mov ecx, eax
cmp ecx, ebp
ja 0x498122
mov al, byte [esi + 7]
mov byte [esp + 0x16], al
cmp ecx, dword [esp + 0x3c]
jae 0x497fbb
cmp al, 0xfd
jae 0x497faf
inc al
mov byte [esp + 0x16], al
cmp al, 0xfd
jb 0x497fdf
mov al, 0xfc
jmp 0x497fb5
cmp al, 0xfe
jne 0x497fdf
mov al, 1
mov byte [esp + 0x16], al
jmp 0x497fdf
cmp al, 0xfd
jae 0x497fdf
movzx eax, word [esi + 4]
sub eax, 0x1c
mov byte [esp + 0x16], 0xfe
add dword [edi + 0x5c], eax
movzx eax, word [esi + 4]
sub eax, 0x1c
add dword [edi + 0x108], eax
mov al, byte [esp + 0x16]
sub al, 3
cmp al, 0xf9
ja 0x4980c3
cmp dword [esp + 0x28], 0
jne 0x49802e
cmp dword [edi + 0xa8], ebx
jne 0x49802e
mov eax, dword [edi + 0x60]
cmp eax, 0x2bc2
jl 0x498009
cdq
sub eax, edx
sar eax, 1
jmp 0x49800e
mov eax, 0x15e0
cmp dword [edi + 0x5c], eax
mov dword [edi + 0x10c], eax
mov dword [edi + 0x60], eax
cmovl eax, dword [edi + 0x5c]
mov dword [edi + 0x5c], eax
xor eax, eax
inc eax
mov dword [edi + 0x108], ebx
mov dword [esp + 0x28], eax
cmp dword [esp + 0x18], 0
mov byte [esp + 0x16], 0xff
mov dword [esp + 0x58], ecx
jne 0x49808c
cmp esi, dword [edi + 0xc8]
je 0x49804e
cmp dword [edi + 0x11c], ebx
jne 0x49805a
mov eax, dword [edi + 0xb0]
mov dword [edi + 0x11c], eax
mov eax, dword [edi + 0xb0]
mov edx, dword [esp + 0x20]
mov ecx, dword [esp + 0x24]
mov dword [edi + 0xb4], eax
mov dword [esi + 0xe], eax
movzx eax, word [esi + 4]
push eax
lea eax, [esi + 0x12]
push eax
call fcn.00495eea
inc byte [esi + 6]
mov dword [esp + 0x20], 1
jmp 0x498105
movzx eax, word [esi + 4]
cmp dword [edi + 0x5c], eax
jl 0x498107
mov eax, dword [edi + 0xb0]
mov dword [esi + 0xe], eax
cmp dword [edi + 0x11c], ebx
jne 0x4980b2
mov eax, dword [edi + 0xb0]
mov dword [edi + 0x11c], eax
movzx eax, word [esi + 4]
inc byte [esi + 6]
push 0x1c
pop ecx
sub ecx, eax
add dword [edi + 0x5c], ecx
jmp 0x4980e3
mov al, byte [esp + 0x16]
cmp al, 0xff
jne 0x49810b
movzx ecx, word [esi + 4]
cmp dword [edi + 0x5c], ecx
jl 0x49810b
mov eax, dword [edi + 0xb0]
inc byte [esi + 6]
mov dword [esi + 0xe], eax
sub dword [edi + 0x5c], ecx
mov eax, dword [edi + 0xb0]
mov edx, dword [esp + 0x20]
mov ecx, dword [esp + 0x24]
mov dword [edi + 0xb4], eax
movzx eax, word [esi + 4]
push eax
lea eax, [esi + 0x12]
push eax
call fcn.00495eea
pop ecx
pop ecx
mov al, byte [esp + 0x16]
mov byte [esi + 7], al
mov esi, dword [esi]
test esi, esi
je 0x498122
push dword [esi + 0x22]
call dword [sym.imp.WS2_32.dll_ntohl]
jmp 0x497f86
mov ebp, dword [esp + 0x4c]
inc dword [esp + 0x38]
push 4
pop eax
add ebp, eax
mov eax, dword [esp + 0x30]
mov dword [esp + 0x4c], ebp
test esi, esi
jne 0x497f43
mov eax, dword [esp + 0x58]
test eax, eax
je 0x498155
cmp dword [edi + 0xa8], ebx
jne 0x498155
mov dword [edi + 0xa8], eax
movzx esi, word [edi + 0xd0]
mov dword [esp + 0x60], esi
cmp dword [edi + 0x58], ebx
jle 0x498248
mov esi, dword [esp + 0x24]
push 0x1c
pop ebp
mov edx, dword [edi + 0xd8]
test edx, edx
je 0x498244
movzx eax, word [edx + 4]
add eax, 0xffffffe4
cmp dword [edi + 0x58], eax
jl 0x498244
cmp dword [edi + 0x5c], eax
jl 0x498244
mov eax, dword [edx]
mov dword [edi + 0xd8], eax
test eax, eax
jne 0x4981a9
mov dword [edi + 0xdc], ebx
mov eax, 0xffff
add word [edi + 0xd0], ax
mov eax, dword [edi + 0xcc]
test eax, eax
jne 0x4981c7
mov dword [edi + 0xc8], edx
jmp 0x4981c9
mov dword [eax], edx
mov dword [edx], ebx
mov ecx, ebp
inc word [edi + 0xc0]
mov dword [edi + 0xcc], edx
movzx eax, word [edx + 4]
sub eax, ebp
add dword [edi + 0xc4], eax
movzx eax, word [edx + 4]
sub ecx, eax
add dword [edi + 0x5c], ecx
mov ecx, ebp
movzx eax, word [edx + 4]
sub ecx, eax
add dword [edi + 0x58], ecx
mov ecx, ebp
movzx eax, word [edx + 4]
sub ecx, eax
add dword [edi + 0xd4], ecx
cmp dword [edi + 0x11c], ebx
jne 0x49821c
mov eax, dword [edi + 0xb0]
mov dword [edi + 0x11c], eax
mov eax, dword [edi + 0xb0]
mov ecx, esi
mov dword [edx + 0xe], eax
movzx eax, word [edx + 4]
push eax
lea eax, [edx + 0x12]
mov edx, dword [esp + 0x24]
push eax
call fcn.00495eea
pop ecx
pop ecx
cmp dword [edi + 0x58], ebx
jg 0x498170
mov esi, dword [esp + 0x60]
mov eax, dword [esp + 0x24]
cmp dword [eax + 0x144], ebx
je 0x498fca
cmp word [edi + 0xd0], bx
jne 0x498fca
test esi, esi
je 0x498fca
mov dword [edi + 0x7c], ebx
mov esi, eax
push dword [edi + 0x3c]
push edi
push esi
call dword [esi + 0x144]
mov eax, dword [esp + 0x2c]
add esp, 0xc
mov eax, dword [esi + eax*4 + 0x178]
test eax, eax
je 0x4990f7
cmp dword [eax + 0x78], 2
jne 0x4990f7
lea esi, [edi + 0x7c]
mov ecx, esi
call fcn.0044cfd4
jmp 0x498fcd
push esi
mov esi, dword [esp + 0x30]
mov ecx, esi
mov dword [edi + 0xbc], ebx
mov edx, dword [edi + 0xf0]
push ebx
push 5
call fcn.00495f62
mov eax, dword [esp + 0x40]
add esp, 0xc
mov edx, dword [esp + 0x1c]
add eax, 0xfffffffc
mov ecx, dword [edi + 0xf0]
add edx, 4
add esi, 4
push eax
mov eax, dword [esp + 0x84]
add eax, edx
mov edx, 0xffc
sub edx, ecx
add ecx, esi
push eax
call section..text
mov esi, dword [esp + 0x3c]
mov eax, esi
pop ecx
pop ecx
push 4
and eax, 3
pop ecx
sub ecx, eax
and ecx, reloc.WS2_32.dll_closesocket
jns 0x498317
dec ecx
or ecx, 0xfffffffc
inc ecx
add ecx, esi
add dword [edi + 0xf0], ecx
jmp 0x498fca
mov dword [edi + 0xbc], ebx
jmp 0x498fca
call dword [sym.imp.KERNEL32.dll_GetTickCount64]
mov ecx, dword [esp + 0x80]
mov edx, dword [esp + 0x1c]
sub eax, dword [ecx + edx + 4]
mov dword [edi + 0x110], eax
mov ecx, dword [edi + 0x110]
cdq
sub eax, edx
mov dword [edi + 0x10c], 0x15e0
sar eax, 1
mov dword [edi + 0x114], eax
lea eax, [ecx + eax*4]
mov dword [edi + 0x118], eax
mov eax, 0x3e8
cmp dword [edi + 0x118], eax
jge 0x498381
mov dword [edi + 0x118], eax
mov edx, dword [edi + 0xf0]
mov ecx, dword [esp + 0x2c]
push 4
pop eax
push eax
push ebx
push 0xb
call fcn.00495f62
mov esi, dword [esp + 0x30]
add esp, 0xc
mov dword [edi + 0xf0], eax
cmp dword [esi + 0x13c], ebx
je 0x498fca
cmp dword [edi + 0x78], 1
jne 0x498fca
push 1
push edi
mov dword [edi + 0x78], 2
push esi
mov dword [edi + 0x7c], ebx
call dword [esi + 0x13c]
mov eax, dword [esp + 0x2c]
add esp, 0xc
mov eax, dword [esi + eax*4 + 0x178]
test eax, eax
je 0x4990f7
cmp dword [eax + 0x78], ebx
je 0x4990f7
jmp 0x49829d
mov esi, dword [esp + 0x80]
add esi, ecx
push dword [esi + 4]
call dword [sym.imp.WS2_32.dll_ntohl]
mov cl, byte [esp + 0x44]
mov ebp, eax
and cl, 3
cmp cl, 3
mov cl, byte [esp + 0x44]
sete al
shr cl, 2
and al, cl
and al, 1
mov byte [esp + 0x16], al
je 0x49849b
movzx eax, word [esi + 8]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
push dword [esi + 0xc]
movzx eax, ax
mov dword [esp + 0x5c], eax
call dword [sym.imp.WS2_32.dll_ntohl]
mov ecx, dword [edi + 0x68]
inc ecx
mov dword [esp + 0x60], eax
cmp ebp, ecx
jne 0x49845a
mov ecx, dword [esp + 0x34]
add ecx, 0xfffffff0
push ecx
lea ecx, [esi + 0x10]
push ecx
push eax
jmp 0x498482
jbe 0x49849b
mov ecx, dword [edi + 0xe0]
mov edx, 0x49744a
push esi
call fcn.0048b03b
pop ecx
test eax, eax
jne 0x49849b
mov eax, dword [esp + 0x34]
add eax, 0xfffffff0
push eax
lea eax, [esi + 0x10]
push eax
push dword [esp + 0x68]
push dword [esp + 0x50]
mov edx, dword [esp + 0x30]
push ecx
push dword [esp + 0x6c]
mov ecx, dword [esp + 0x3c]
call fcn.0049667f
add esp, 0x18
mov eax, dword [edi + 0x68]
inc eax
cmp ebp, eax
jne 0x498750
mov dword [edi + 0x68], ebp
movzx eax, word [esi + 8]
mov ebp, dword [sym.imp.WS2_32.dll_ntohs]
push eax
call ebp
movzx eax, ax
mov dword [esp + 0x58], eax
movzx eax, word [esi + 0xa]
push eax
call ebp
push dword [esi + 0xc]
call dword [sym.imp.WS2_32.dll_ntohl]
test byte [edi + 0x9c], 1
mov dword [esp + 0x60], eax
jne 0x49871f
mov edx, dword [edi + 0x68]
lea ecx, [edx - 1]
cmp dword [edi + 0x6c], ecx
jb 0x49871f
mov ecx, dword [edi + 0xe0]
mov dword [edi + 0x6c], edx
call fcn.0048b185
jmp 0x49852f
mov ecx, ebp
call fcn.0048b1c4
test eax, eax
jne 0x49850d
mov eax, ebx
jmp 0x49851d
mov ecx, ebp
call fcn.0048b1c4
push dword [eax + 4]
call dword [sym.imp.WS2_32.dll_ntohl]
mov ecx, dword [edi + 0x68]
inc ecx
cmp eax, ecx
jne 0x498535
mov ecx, ebp
mov dword [edi + 0x68], eax
call fcn.0048b1af
mov ebp, eax
test ebp, ebp
jne 0x4984fe
cmp dword [esp + 0x40], 0
mov ebp, dword [esp + 0x24]
jne 0x498565
push dword [edi + 0xf0]
mov edx, dword [esp + 0x24]
mov ecx, ebp
push dword [esp + 0x30]
mov dword [esp + 0x48], 1
call fcn.00495fec
pop ecx
pop ecx
mov dword [edi + 0xf0], eax
cmp byte [esp + 0x16], 0
jne 0x4985bc
mov eax, dword [esp + 0x34]
add eax, 0xfffffff0
mov dword [edi + 0x7c], ebx
push eax
lea eax, [esi + 0x10]
mov esi, dword [esp + 0x24]
push eax
push dword [esp + 0x68]
mov edx, esi
push dword [esp + 0x50]
push ecx
push dword [esp + 0x6c]
mov ecx, ebp
call fcn.0049667f
mov eax, dword [ebp + esi*4 + 0x178]
add esp, 0x18
test eax, eax
je 0x4990f7
cmp dword [eax + 0x78], ebx
je 0x4990f7
lea esi, [edi + 0x7c]
mov ecx, esi
call fcn.0044cfd4
jmp 0x4985bf
lea esi, [edi + 0x7c]
mov ecx, dword [edi + 0xe0]
mov dword [esp + 0x48], ebx
call fcn.0048b3fe
test eax, eax
jle 0x498fcd
mov ecx, dword [edi + 0xe0]
call fcn.0048b185
mov ecx, eax
call fcn.0048b1c4
mov esi, eax
mov cl, byte [esi + 1]
push dword [esi + 4]
mov byte [esp + 0x68], cl
call dword [sym.imp.WS2_32.dll_ntohl]
movzx ecx, word [esi + 2]
mov ebp, eax
push ecx
call dword [sym.imp.WS2_32.dll_ntohs]
mov ecx, dword [edi + 0x68]
inc ecx
movzx eax, ax
mov dword [esp + 0x60], eax
cmp ebp, ecx
ja 0x498702
mov eax, dword [edi + 0x6c]
inc eax
cmp ebp, eax
ja 0x498702
movzx eax, word [esi + 2]
add dword [esp + 0x48], eax
movzx eax, word [esi + 8]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
movzx eax, ax
mov dword [esp + 0x4c], eax
movzx eax, word [esi + 0xa]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
push dword [esi + 0xc]
call dword [sym.imp.WS2_32.dll_ntohl]
mov ecx, dword [edi + 0xe0]
mov dword [esp + 0x58], eax
mov dword [edi + 0x68], ebp
mov dword [edi + 0x6c], ebp
call fcn.0048b185
mov ecx, eax
call fcn.0048b160
test byte [eax], 1
jne 0x4986ca
mov eax, dword [esp + 0x60]
mov ebp, dword [esp + 0x24]
mov edx, dword [esp + 0x20]
movzx eax, ax
sub eax, 0x10
mov dword [edi + 0x7c], ebx
push eax
lea eax, [esi + 0x10]
push eax
push dword [esp + 0x60]
push dword [esp + 0x70]
push ecx
push dword [esp + 0x60]
mov ecx, ebp
call fcn.0049667f
mov eax, dword [esp + 0x38]
add esp, 0x18
mov eax, dword [ebp + eax*4 + 0x178]
test eax, eax
je 0x4990f7
cmp dword [eax + 0x78], ebx
je 0x4990f7
lea ecx, [edi + 0x7c]
call fcn.0044cfd4
push 1
push esi
call fcn.005ed680
pop ecx
pop ecx
mov ecx, dword [edi + 0xe0]
call fcn.0048b185
mov ecx, eax
call fcn.0048b261
test byte [edi + 0x9c], 1
jne 0x498702
mov ecx, dword [edi + 0xe0]
call fcn.0048b3fe
test eax, eax
jg 0x4985d6
mov ecx, dword [esp + 0x48]
lea esi, [edi + 0x7c]
test ecx, ecx
jle 0x498fcd
mov eax, dword [edi + 0xe0]
sub dword [eax + 8], ecx
jmp 0x498fcd
lea eax, [esp + 0x40]
mov edx, esi
push eax
mov ecx, edi
call fcn.004973db
pop ecx
test eax, eax
je 0x498fca
mov ecx, eax
call fcn.0048b160
mov cl, byte [esp + 0x44]
shr cl, 2
xor cl, byte [eax]
and cl, 1
xor byte [eax], cl
jmp 0x498fca
jbe 0x498789
lea eax, [esp + 0x40]
mov edx, esi
push eax
mov ecx, edi
call fcn.004973db
pop ecx
test eax, eax
je 0x498fca
xor ebx, ebx
mov ecx, eax
cmp byte [esp + 0x16], bl
setne bl
call fcn.0048b160
mov cl, byte [eax]
xor cl, bl
and cl, 1
xor byte [eax], cl
xor ebx, ebx
jmp 0x498fca
cmp dword [esp + 0x40], 0
jne 0x498fca
push dword [edi + 0xf0]
mov edx, dword [esp + 0x24]
push dword [esp + 0x30]
mov ecx, dword [esp + 0x2c]
mov dword [esp + 0x48], 1
call fcn.00495fec
pop ecx
pop ecx
mov dword [edi + 0xf0], eax
jmp 0x498fca
mov esi, dword [esp + 0x80]
mov dword [esp + 0x30], ebx
movzx eax, word [ecx + esi + 2]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
mov ebp, dword [edi + 0xf0]
add ebp, dword [esp + 0x2c]
movzx eax, ax
mov dword [esp + 0x4c], ebp
mov dword [esp + 0x18], ebx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x6c], eax
cmp eax, 4
jbe 0x498fca
lea ecx, [esi + 4]
add ecx, dword [esp + 0x1c]
mov dword [esp + 0x38], ecx
mov esi, dword [esp + 0x30]
add esi, ecx
movzx eax, word [esi + 2]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
movzx eax, ax
mov dword [esp + 0x68], eax
movzx eax, word [esi]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
movzx eax, ax
sub eax, 0xd
je 0x498a95
sub eax, 1
je 0x4988a3
dec eax
sub eax, 1
jne 0x498e77
mov edx, dword [edi + 0x94]
test edx, edx
je 0x498e77
cmp dl, 0xff
je 0x498e77
mov eax, dword [esi + 4]
cmp eax, dword [edx + 0x14]
jne 0x498e77
mov ecx, edi
call fcn.004971ab
mov ecx, dword [edi + 0x34]
lea edx, [edi + 0x10]
mov esi, eax
mov ecx, dword [ecx + 0x28]
call fcn.0048acf1
mov dword [edi + 0x94], ebx
mov edx, 0x497177
push edi
mov ecx, esi
mov dword [edi + 0x7c], ebx
call fcn.0048bc6b
pop ecx
lea ecx, [edi + 0x7c]
call fcn.0044cfd4
jmp 0x498e77
movzx eax, word [esi + 2]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
movzx eax, ax
sub eax, 8
cdq
sub eax, edx
sar eax, 1
cmp dword [esp + 0x28], 0
movzx esi, ax
mov eax, dword [edi + 0x94]
mov dword [esp + 0x60], eax
mov eax, dword [esp + 0x18]
je 0x498933
push 0x10
movzx esi, ax
call dword [sym.imp.WS2_32.dll_htons]
push 0xc
mov word [esi + ebp + 4], ax
call dword [sym.imp.WS2_32.dll_htons]
mov ecx, dword [esp + 0x38]
mov word [esi + ebp + 6], ax
mov eax, dword [esp + 0x30]
mov eax, dword [ecx + eax + 4]
mov dword [esi + ebp + 8], eax
mov eax, dword [esp + 0x60]
cmp al, 0xff
jne 0x49890f
test ah, ah
jne 0x49890f
xor eax, eax
inc eax
jmp 0x498911
mov eax, ebx
neg eax
sbb eax, eax
and eax, 6
push eax
call dword [sym.imp.WS2_32.dll_htonl]
mov dword [esi + ebp + 0xc], eax
mov esi, dword [esp + 0x18]
add esi, 0xc
mov dword [esp + 0x18], esi
jmp 0x498e7b
movzx eax, ax
add eax, 4
add eax, ebp
push 0xd
mov dword [esp + 0x2c], eax
call dword [sym.imp.WS2_32.dll_htons]
mov ecx, dword [esp + 0x28]
mov word [ecx], ax
lea eax, [esi*2 + 0x10]
mov word [ecx + 2], ax
mov eax, dword [edi + 0x64]
dec eax
push eax
call dword [sym.imp.WS2_32.dll_htonl]
mov ecx, dword [esp + 0x28]
mov dword [ecx + 0xc], eax
mov ecx, dword [edi + 0xa0]
push ecx
lea eax, [ecx + 1]
mov dword [edi + 0xa0], eax
call dword [sym.imp.WS2_32.dll_htonl]
mov ecx, dword [esp + 0x28]
mov dword [ecx + 4], eax
mov ecx, dword [edi + 0xa4]
push ecx
lea eax, [ecx + 1]
mov dword [edi + 0xa4], eax
call dword [sym.imp.WS2_32.dll_htonl]
mov ecx, dword [esp + 0x28]
push 4
movzx edx, word [ecx + 2]
mov dword [ecx + 8], eax
mov eax, edx
and eax, 3
pop ecx
sub ecx, eax
and ecx, reloc.WS2_32.dll_closesocket
jns 0x4989c0
dec ecx
or ecx, 0xfffffffc
inc ecx
add ecx, edx
add dword [esp + 0x18], ecx
push edx
call dword [sym.imp.WS2_32.dll_htons]
mov ecx, dword [esp + 0x28]
mov word [ecx + 2], ax
test si, si
je 0x498e77
mov ebp, dword [esp + 0x38]
mov eax, esi
add ebp, 6
lea ecx, [ecx + eax*2]
add ecx, 0xe
add ebp, dword [esp + 0x30]
mov dword [esp + 0x48], ecx
lea ebp, [ebp + eax*2]
movzx eax, word [ebp]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
mov ecx, dword [edi + 0x80]
movzx eax, ax
mov dword [esp + 0x58], eax
movzx eax, ax
push 1
mov edx, eax
mov dword [esp + 0x64], eax
call fcn.0048ba70
pop ecx
test eax, 0x8000
je 0x498a61
mov edx, dword [esp + 0x60]
mov ecx, dword [edi + 0x84]
push 1
call fcn.0048ba70
mov eax, dword [esp + 0x28]
pop ecx
cmp dword [eax + 0x1b4], ebx
je 0x498a61
push dword [esp + 0x58]
mov dword [edi + 0x7c], ebx
push edi
push eax
call dword [eax + 0x1b4]
add esp, 0xc
lea ecx, [edi + 0x7c]
call fcn.0044cfd4
push dword [esp + 0x58]
call dword [sym.imp.WS2_32.dll_htons]
mov ecx, dword [esp + 0x48]
sub ebp, 2
mov word [ecx], ax
mov eax, 0xffff
add esi, eax
sub ecx, 2
mov dword [esp + 0x48], ecx
test si, si
jne 0x4989f9
mov ebp, dword [esp + 0x4c]
jmp 0x498e77
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x38]
movzx esi, ax
mov eax, dword [esp + 0x30]
movzx eax, word [ecx + eax + 2]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
mov ecx, dword [esp + 0x30]
movzx eax, ax
sub eax, 0x10
cdq
sub eax, edx
sar eax, 1
movzx eax, ax
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x38]
push dword [eax + ecx + 0xc]
call dword [sym.imp.WS2_32.dll_ntohl]
push 0x10
mov dword [esp + 0x5c], eax
call dword [sym.imp.WS2_32.dll_htons]
push 0xc
mov word [esi + ebp + 4], ax
call dword [sym.imp.WS2_32.dll_htons]
mov ecx, dword [esp + 0x30]
mov word [esi + ebp + 6], ax
mov eax, dword [esp + 0x38]
mov ecx, dword [eax + ecx + 4]
mov eax, dword [esp + 0x18]
add eax, 0xc
mov dword [esi + ebp + 8], ecx
cmp dword [esp + 0x28], 0
mov dword [esp + 0x18], eax
je 0x498b25
push 2
call dword [sym.imp.WS2_32.dll_htonl]
mov dword [esi + ebp + 0xc], eax
jmp 0x498e77
movzx eax, ax
add eax, 4
add eax, ebp
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x58]
cmp eax, dword [edi + 0x6c]
ja 0x498da5
push 1
call dword [sym.imp.WS2_32.dll_htonl]
push 0xd
mov dword [esi + ebp + 0xc], eax
call dword [sym.imp.WS2_32.dll_htons]
mov ecx, dword [esp + 0x28]
mov word [ecx], ax
mov eax, dword [esp + 0x3c]
lea eax, [eax*2 + 0x10]
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov ecx, dword [esp + 0x28]
mov word [ecx + 2], ax
mov eax, dword [edi + 0x64]
dec eax
push eax
call dword [sym.imp.WS2_32.dll_htonl]
mov ecx, dword [esp + 0x28]
mov dword [ecx + 0xc], eax
mov ecx, dword [edi + 0xa0]
push ecx
lea eax, [ecx + 1]
mov dword [edi + 0xa0], eax
call dword [sym.imp.WS2_32.dll_htonl]
mov ecx, dword [esp + 0x28]
mov dword [ecx + 4], eax
mov ecx, dword [edi + 0xa4]
push ecx
lea eax, [ecx + 1]
mov dword [edi + 0xa4], eax
call dword [sym.imp.WS2_32.dll_htonl]
mov ecx, dword [esp + 0x28]
mov dword [ecx + 8], eax
mov eax, dword [esp + 0x3c]
test ax, ax
jne 0x498bf1
mov ecx, dword [edi + 0x80]
call fcn.0048bb6c
push edi
mov edx, 0x497177
mov dword [edi + 0x7c], ebx
mov ecx, eax
call fcn.0048bc6b
pop ecx
lea ecx, [edi + 0x7c]
call fcn.0044cfd4
jmp 0x498cca
movzx ecx, ax
mov eax, dword [esp + 0x30]
add eax, dword [esp + 0x38]
mov dword [esp + 0x48], ecx
movzx eax, word [eax + ecx*2 + 0xe]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
mov ecx, dword [edi + 0x80]
movzx eax, ax
mov dword [esp + 0x58], eax
movzx eax, ax
push 1
mov edx, eax
mov dword [esp + 0x64], eax
call fcn.0048ba70
mov ebp, dword [esp + 0x50]
pop ecx
test eax, 0x8000
je 0x498c90
push 1
call dword [sym.imp.WS2_32.dll_htonl]
mov edx, dword [esp + 0x60]
mov dword [esi + ebp + 0xc], eax
mov ecx, dword [edi + 0x84]
push 1
call fcn.0048ba70
mov eax, dword [esp + 0x28]
pop ecx
cmp dword [eax + 0x1b4], ebx
je 0x498c9b
push dword [esp + 0x58]
mov dword [edi + 0x7c], ebx
push edi
push eax
call dword [eax + 0x1b4]
mov eax, dword [esp + 0x30]
add esp, 0xc
mov ecx, dword [esp + 0x20]
cmp dword [eax + ecx*4 + 0x178], ebx
je 0x4990f7
lea ecx, [edi + 0x7c]
call fcn.0044cfd4
jmp 0x498c9b
push ebx
call dword [sym.imp.WS2_32.dll_htonl]
mov dword [esi + ebp + 0xc], eax
push dword [esp + 0x58]
call dword [sym.imp.WS2_32.dll_htons]
mov ecx, dword [esp + 0x48]
mov edx, dword [esp + 0x28]
mov word [edx + ecx*2 + 0xe], ax
mov ecx, 0xffff
mov eax, dword [esp + 0x3c]
add eax, ecx
mov dword [esp + 0x3c], eax
test ax, ax
jne 0x498bf1
push ebx
call dword [sym.imp.WS2_32.dll_htonl]
cmp dword [esi + ebp + 0xc], eax
je 0x498e77
cmp dword [edi + 0x94], ebx
jne 0x498e77
mov eax, dword [esp + 0x3c]
mov ecx, dword [esp + 0x18]
lea ecx, [ecx + eax*2]
mov eax, dword [esp + 0x28]
add ecx, 0x10
mov dword [esp + 0x18], ecx
movzx eax, word [eax + 2]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
push 4
and eax, 3
pop ecx
sub ecx, eax
and ecx, reloc.WS2_32.dll_closesocket
jns 0x498d1d
dec ecx
or ecx, 0xfffffffc
inc ecx
mov eax, dword [esp + 0x28]
mov esi, dword [edi + 0xf4]
sub esi, ecx
add esi, dword [edi + 0xec]
movzx eax, word [eax + 2]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
movzx eax, ax
sub esi, eax
mov dword [edi + 0x98], ebx
lea eax, [esi - 0x10]
mov dword [edi + 0x94], eax
mov byte [eax + 0xc], 0x82
mov eax, dword [edi + 0x94]
mov byte [eax + 0xd], bl
mov eax, dword [esp + 0x3c]
lea eax, [eax*2 + 0x14]
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov ecx, dword [edi + 0x94]
mov esi, dword [esp + 0x28]
mov word [ecx + 0xe], ax
movzx eax, word [esi + 2]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
mov ecx, dword [edi + 0x94]
mov edx, 0x1000
movzx eax, ax
add ecx, 0x10
push eax
push esi
call section..text
pop ecx
pop ecx
jmp 0x498e77
push 6
call dword [sym.imp.WS2_32.dll_htonl]
mov dword [esi + ebp + 0xc], eax
mov eax, dword [edi + 0x94]
test eax, eax
je 0x498dd9
mov ecx, dword [edi + 0xec]
cmp eax, ecx
jb 0x498dd9
mov eax, dword [edi + 0xf4]
add eax, ecx
cmp dword [edi + 0x94], eax
jbe 0x498b14
cmp dword [edi + 0x94], ebx
je 0x498de8
push 6
jmp 0x498b16
mov edx, dword [esp + 0x3c]
mov ecx, dword [edi + 0xf4]
mov esi, dword [esp + 0x58]
mov dword [esp + 0x48], ebx
lea eax, [edx*2 + 4]
mov word [esp + 0x48], 0xff
mov word [esp + 0x4a], ax
movzx eax, ax
sub ecx, eax
mov dword [esp + 0x3c], eax
mov eax, dword [edi + 0xec]
mov dword [ecx + eax], esi
movzx eax, dx
mov dword [esp + 0x60], eax
test eax, eax
je 0x498e6d
mov ebp, dword [esp + 0x60]
mov ebx, dword [esp + 0x3c]
push 4
pop eax
mov esi, eax
mov eax, dword [esp + 0x38]
add eax, dword [esp + 0x30]
movzx eax, word [esi + eax + 0xc]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
mov edx, dword [edi + 0xf4]
mov ecx, dword [edi + 0xec]
sub edx, ebx
add edx, esi
add esi, 2
mov word [edx + ecx], ax
sub ebp, 1
jne 0x498e37
mov ebp, dword [esp + 0x4c]
xor ebx, ebx
mov eax, dword [esp + 0x48]
mov dword [edi + 0x94], eax
mov esi, dword [esp + 0x18]
mov eax, dword [esp + 0x68]
movzx edx, ax
mov eax, edx
push 4
and eax, 3
pop ecx
sub ecx, eax
and ecx, reloc.WS2_32.dll_closesocket
jns 0x498e99
dec ecx
or ecx, 0xfffffffc
inc ecx
mov eax, dword [esp + 0x30]
add ecx, edx
add eax, ecx
mov ecx, dword [esp + 0x38]
mov dword [esp + 0x30], eax
add eax, 4
cmp eax, dword [esp + 0x6c]
jl 0x498808
test si, si
je 0x498fca
lea eax, [esi + 4]
mov word [ebp], 0x82
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp + 2], ax
movzx eax, si
add eax, 4
jmp 0x497c3a
cmp eax, 0xc0
je 0x498f03
mov eax, dword [esp + 0x80]
test byte [ecx + eax], 0x40
je 0x498fca
mov dword [esp + 0x5c], 1
jmp 0x498fca
mov esi, dword [esp + 0x80]
movzx eax, word [ecx + esi + 2]
push eax
call dword [sym.imp.WS2_32.dll_htons]
movzx eax, ax
sub eax, 8
cdq
and edx, 3
lea ebp, [edx + eax]
mov eax, dword [esp + 0x1c]
sar ebp, 2
push dword [eax + esi + 4]
call dword [sym.imp.WS2_32.dll_ntohl]
mov dword [esp + 0x58], eax
cmp eax, dword [edi + 0x68]
jbe 0x498fca
mov ecx, dword [edi + 0xe0]
call fcn.0048b185
mov esi, eax
test esi, esi
je 0x498f8a
mov ebx, dword [esp + 0x58]
mov ecx, esi
call fcn.0048b1c4
test eax, eax
je 0x498f88
cmp dword [eax + 4], ebx
ja 0x498f88
push 1
push eax
call fcn.005ed680
pop ecx
pop ecx
mov ecx, esi
call fcn.0048b261
mov ecx, dword [edi + 0xe0]
call fcn.0048b185
mov esi, eax
test esi, esi
jne 0x498f56
xor ebx, ebx
test ebp, ebp
jle 0x498fc3
mov esi, dword [esp + 0x80]
add esi, 8
add esi, dword [esp + 0x1c]
push dword [esi]
call dword [sym.imp.WS2_32.dll_ntohl]
mov ecx, dword [edi + 0x8c]
mov edx, eax
push ebx
call fcn.0048ba70
pop ecx
test eax, eax
je 0x498fbb
or dword [eax + 4], 0xffffffff
add esi, 8
sub ebp, 1
jne 0x498f9c
mov eax, dword [esp + 0x58]
mov dword [edi + 0x68], eax
lea esi, [edi + 0x7c]
mov ebp, dword [esp + 0x34]
mov eax, ebp
push 4
and eax, 3
pop ecx
sub ecx, eax
and ecx, reloc.WS2_32.dll_closesocket
jns 0x498fe8
dec ecx
or ecx, 0xfffffffc
inc ecx
mov edx, dword [esp + 0x1c]
add ecx, ebp
mov ebp, dword [esp + 0x80]
add edx, ecx
mov dword [esp + 0x1c], edx
add ebp, edx
jne 0x49770c
jmp 0x4990b0
mov eax, dword [esp + 0x50]
mov dword [eax], ebx
jmp 0x4990f7
movzx eax, word [ebp + 2]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
mov ecx, dword [esp + 0x50]
push 4
pop esi
sub ax, si
movzx eax, ax
mov dword [ecx], ebx
xor ecx, ecx
mov dword [esp + 0x84], eax
cmp cx, ax
jae 0x499089
movzx edi, bx
movzx eax, word [edi + ebp + 6]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
and eax, 3
sub esi, eax
and esi, reloc.WS2_32.dll_closesocket
jns 0x49905c
dec esi
or esi, 0xfffffffc
inc esi
movzx eax, word [edi + ebp + 6]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
add ax, si
movzx esi, ax
movzx eax, word [edi + ebp + 4]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
add ebx, esi
push 4
pop esi
cmp bx, word [esp + 0x84]
jb 0x49903b
mov edx, dword [esp + 0x20]
mov ecx, dword [esp + 0x24]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x6c
jmp fcn.00496ea6
mov eax, dword [esp + 0x50]
mov edx, dword [esp + 0x20]
mov ecx, dword [esp + 0x24]
mov dword [eax], ebx
jmp 0x499091
lea esi, [edi + 0x7c]
mov edx, dword [esp + 0x2c]
mov ebp, dword [esp + 0x20]
cmp ebp, 0xffffffff
je 0x4990f5
mov eax, dword [edi + 0xf0]
cmp eax, 0xc
jle 0x4990ef
test byte [edx + 8], 4
je 0x4990db
push eax
push edx
call fcn.0049745e
mov edx, dword [esp + 0x34]
pop ecx
pop ecx
push dword [edi + 0xf0]
mov ecx, dword [esp + 0x28]
push edx
mov edx, ebp
call fcn.00495eea
pop ecx
pop ecx
mov dword [edi + 0xf0], ebx
mov dword [esi], ebx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x6c
ret