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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x64
mov eax, ecx
mov dword [esp + 0x1c], edx
push ebx
push esi
push edi
mov edi, dword [eax + edx*4 + 0x170]
mov dword [esp + 0x24], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 0x18], 0xc
mov dword [esp + 0x4c], 0
mov dword [esp + 0x54], 0
mov dword [esp + 0x34], 0
cmp eax, 0xc
jl 0x4c1dbc
test edi, edi
je 0x4c1dbc
mov ebx, dword [ebp + 8]
mov edx, ebx
push eax
mov esi, dword [ebx + 8]
mov dword [ebx + 8], 0
call fcn.004c5c90
add esp, 4
cmp esi, eax
jne 0x4c1dbc
push 0xffffffffffffffff
push dword [edi + 0x74]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [ebx + 4]
cmp dword [edi + 0x4c], eax
je 0x4c026c
test eax, eax
je 0x4c026c
push 0
push 1
push dword [edi + 0x74]
call dword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [edi + 0xe4]
lea eax, [ebx + 0xc]
mov esi, dword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
mov ebx, eax
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x48], eax
mov dword [ecx + 8], 0
mov dword [ecx + 4], 0
mov dword [ecx], 0
mov dword [edi + 0xe8], 0xc
test ebx, ebx
je 0x4c1d6c
mov eax, 0xc
add eax, 4
cmp eax, dword [ebp + 0xc]
jg 0x4c1d62
cmp dword [esp + 0x4c], 0
jne 0x4c1d62
mov al, byte [ebx]
mov byte [esp + 0x13], al
mov al, byte [ebx + 1]
mov byte [esp + 0x44], al
movzx eax, word [ebx + 2]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
movzx esi, ax
cmp esi, 4
jb 0x4c1d62
mov ecx, dword [esp + 0x18]
mov eax, esi
mov dword [esp + 0x14], eax
add eax, ecx
cmp eax, dword [ebp + 0xc]
jg 0x4c1d62
movzx eax, byte [esp + 0x13]
cmp eax, 0xc0
ja case.0x4c0317.12
movzx eax, byte [eax + 0x4c1eb4]
jmp dword [eax*4 + 0x4c1e80]
mov eax, dword [ebp + 8]
mov dword [esp + 0x38], 0
movzx eax, word [ecx + eax + 2]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
mov esi, dword [edi + 0xe8]
add esi, dword [esp + 0x2c]
movzx eax, ax
mov dword [esp + 0x20], esi
mov dword [esp + 0x1c], 0
mov dword [esp + 0x30], 0
mov dword [esp + 0x60], eax
cmp eax, 4
jbe 0x4c1d2e
mov ecx, dword [ebp + 8]
add ecx, 4
add ecx, dword [esp + 0x18]
mov dword [esp + 0x3c], ecx
jmp 0x4c0377
mov esi, dword [esp + 0x20]
mov ebx, dword [esp + 0x38]
add ebx, ecx
movzx eax, word [ebx + 2]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
movzx eax, ax
mov dword [esp + 0x5c], eax
movzx eax, word [ebx]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
movzx eax, ax
sub eax, 0xd
je 0x4c0673
sub eax, 1
je 0x4c047e
sub eax, 2
jne 0x4c040c
mov edx, dword [edi + 0x8c]
test edx, edx
je 0x4c040c
cmp dl, 0xff
je 0x4c040c
mov eax, dword [ebx + 4]
cmp eax, dword [edx + 0x14]
jne 0x4c040c
mov ecx, edi
call fcn.004bfd80
mov ecx, dword [edi + 0x2c]
lea edx, [edi + 0x10]
mov esi, eax
mov ecx, dword [ecx + 0x20]
call fcn.004b2870
push 0
push 1
push dword [edi + 0x74]
mov dword [edi + 0x8c], 0
call dword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
mov edx, edi
mov ecx, esi
call fcn.004bfd50
push 0xffffffffffffffff
push dword [edi + 0x74]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ebx, dword [esp + 0x20]
mov esi, dword [esp + 0x1c]
mov eax, dword [esp + 0x5c]
mov ecx, 4
movzx edx, ax
mov eax, edx
and eax, 3
sub ecx, eax
and ecx, reloc.WS2_32.dll_closesocket
jns 0x4c0434
dec ecx
or ecx, 0xfffffffc
inc ecx
mov eax, dword [esp + 0x38]
add ecx, edx
add eax, ecx
mov ecx, dword [esp + 0x3c]
mov dword [esp + 0x38], eax
add eax, 4
cmp eax, dword [esp + 0x60]
jl 0x4c0373
test si, si
je 0x4c1d2e
lea eax, [esi + 4]
mov word [ebx], 0x82
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebx + 2], ax
movzx eax, si
add eax, 4
add dword [edi + 0xe8], eax
jmp 0x4c1d2e
movzx eax, word [ebx + 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 + 0x30], 0
movzx ebx, ax
mov eax, dword [edi + 0x8c]
mov dword [esp + 0x58], eax
mov eax, dword [esp + 0x1c]
je 0x4c0514
push 0x10
movzx esi, ax
call dword [sym.imp.WS2_32.dll_htons]
mov ebx, dword [esp + 0x20]
push 0xc
mov word [esi + ebx + 4], ax
call dword [sym.imp.WS2_32.dll_htons]
mov ecx, dword [esp + 0x38]
mov word [esi + ebx + 6], ax
mov eax, dword [esp + 0x3c]
mov eax, dword [eax + ecx + 4]
mov dword [esi + ebx + 8], eax
mov eax, dword [esp + 0x58]
cmp al, 0xff
jne 0x4c04f0
test ah, ah
jne 0x4c04f0
mov eax, 1
jmp 0x4c04f2
xor eax, eax
neg eax
sbb eax, eax
and eax, 6
push eax
call dword [sym.imp.WS2_32.dll_htonl]
mov dword [esi + ebx + 0xc], eax
mov esi, dword [esp + 0x1c]
add esi, 0xc
mov dword [esp + 0x1c], esi
jmp 0x4c0414
movzx eax, ax
add eax, 4
add esi, eax
push 0xd
mov dword [esp + 0x34], esi
call dword [sym.imp.WS2_32.dll_htons]
mov word [esi], ax
lea eax, [ebx*2 + 0x10]
mov word [esi + 2], ax
mov eax, dword [edi + 0x5c]
dec eax
push eax
call dword [sym.imp.WS2_32.dll_htonl]
mov dword [esi + 0xc], eax
mov ecx, dword [edi + 0x98]
push ecx
lea eax, [ecx + 1]
mov dword [edi + 0x98], eax
call dword [sym.imp.WS2_32.dll_htonl]
mov dword [esi + 4], eax
mov ecx, dword [edi + 0x9c]
push ecx
lea eax, [ecx + 1]
mov dword [edi + 0x9c], eax
call dword [sym.imp.WS2_32.dll_htonl]
movzx edx, word [esi + 2]
mov ecx, 4
mov dword [esi + 8], eax
mov eax, edx
and eax, 3
sub ecx, eax
and ecx, reloc.WS2_32.dll_closesocket
jns 0x4c0593
dec ecx
or ecx, 0xfffffffc
inc ecx
add ecx, edx
add dword [esp + 0x1c], ecx
push edx
call dword [sym.imp.WS2_32.dll_htons]
mov word [esi + 2], ax
test bx, bx
je 0x4c040c
mov eax, ebx
lea ecx, [eax + 7]
lea ecx, [esi + ecx*2]
mov dword [esp + 0x50], ecx
mov ecx, dword [esp + 0x38]
add ecx, 6
add ecx, dword [esp + 0x3c]
lea eax, [ecx + eax*2]
mov dword [esp + 0x40], eax
nop dword [eax + eax]
movzx eax, word [eax]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
mov ecx, dword [edi + 0x78]
movzx esi, ax
mov eax, esi
push 1
mov edx, eax
mov dword [esp + 0x5c], eax
call fcn.004b3900
add esp, 4
test eax, 0x8000
je 0x4c063f
mov ecx, dword [edi + 0x7c]
mov edx, esi
push 1
call fcn.004b3900
mov eax, dword [esp + 0x28]
add esp, 4
cmp dword [eax + 0x1ac], 0
je 0x4c063f
push 0
push 1
push dword [edi + 0x74]
call dword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
mov eax, dword [esp + 0x24]
push esi
push edi
push eax
mov eax, dword [eax + 0x1ac]
call eax
add esp, 0xc
push 0xffffffffffffffff
push dword [edi + 0x74]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push esi
call dword [sym.imp.WS2_32.dll_htons]
mov ecx, dword [esp + 0x50]
add ebx, 0xffff
mov word [ecx], ax
sub ecx, 2
mov eax, dword [esp + 0x40]
sub eax, 2
mov dword [esp + 0x50], ecx
mov dword [esp + 0x40], eax
test bx, bx
jne 0x4c05d0
jmp 0x4c040c
mov eax, dword [esp + 0x1c]
movzx esi, ax
movzx eax, word [ebx + 2]
push eax
mov dword [esp + 0x44], esi
call dword [sym.imp.WS2_32.dll_ntohs]
mov ecx, dword [esp + 0x38]
movzx eax, ax
sub eax, 0x10
cdq
sub eax, edx
sar eax, 1
movzx ebx, ax
mov eax, dword [esp + 0x3c]
push dword [eax + ecx + 0xc]
call dword [sym.imp.WS2_32.dll_ntohl]
push 0x10
mov dword [esp + 0x54], eax
call dword [sym.imp.WS2_32.dll_htons]
mov ecx, dword [esp + 0x20]
push 0xc
mov word [esi + ecx + 4], ax
call dword [sym.imp.WS2_32.dll_htons]
mov edx, dword [esp + 0x20]
mov ecx, dword [esp + 0x38]
mov word [esi + edx + 6], ax
mov eax, dword [esp + 0x3c]
mov ecx, dword [eax + ecx + 4]
mov eax, dword [esp + 0x1c]
add eax, 0xc
mov dword [esi + edx + 8], ecx
cmp dword [esp + 0x30], 0
mov dword [esp + 0x1c], eax
je 0x4c0706
push 2
call dword [sym.imp.WS2_32.dll_htonl]
mov ebx, dword [esp + 0x20]
mov dword [esi + ebx + 0xc], eax
jmp 0x4c0410
movzx eax, ax
add eax, 4
add eax, edx
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x50]
cmp eax, dword [edi + 0x64]
ja 0x4c099d
push 1
call dword [sym.imp.WS2_32.dll_htonl]
mov ecx, dword [esp + 0x20]
push 0xd
mov dword [esi + ecx + 0xc], eax
call dword [sym.imp.WS2_32.dll_htons]
mov ecx, dword [esp + 0x30]
mov word [ecx], ax
lea eax, [ebx*2 + 0x10]
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov ecx, dword [esp + 0x30]
mov word [ecx + 2], ax
mov eax, dword [edi + 0x5c]
dec eax
push eax
call dword [sym.imp.WS2_32.dll_htonl]
mov ecx, dword [esp + 0x30]
mov dword [ecx + 0xc], eax
mov ecx, dword [edi + 0x98]
push ecx
lea eax, [ecx + 1]
mov dword [edi + 0x98], eax
call dword [sym.imp.WS2_32.dll_htonl]
mov ecx, dword [esp + 0x30]
mov dword [ecx + 4], eax
mov ecx, dword [edi + 0x9c]
push ecx
lea eax, [ecx + 1]
mov dword [edi + 0x9c], eax
call dword [sym.imp.WS2_32.dll_htonl]
mov ecx, dword [esp + 0x30]
mov dword [ecx + 8], eax
test bx, bx
jne 0x4c07d5
mov ecx, dword [edi + 0x78]
call fcn.004b3a10
push 0
push 1
push dword [edi + 0x74]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
mov edx, edi
mov ecx, esi
call fcn.004bfd50
push 0xffffffffffffffff
push dword [edi + 0x74]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
jmp 0x4c08b8
mov ecx, dword [esp + 0x3c]
add ecx, dword [esp + 0x38]
movzx eax, bx
mov dword [esp + 0x50], eax
movzx eax, word [ecx + eax*2 + 0xe]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
mov ecx, dword [edi + 0x78]
movzx esi, ax
mov eax, esi
push 1
mov edx, eax
mov dword [esp + 0x5c], eax
call fcn.004b3900
add esp, 4
test eax, 0x8000
je 0x4c0881
push 1
call dword [sym.imp.WS2_32.dll_htonl]
mov ecx, dword [esp + 0x40]
mov edx, dword [esp + 0x20]
push 1
mov dword [ecx + edx + 0xc], eax
mov edx, esi
mov ecx, dword [edi + 0x7c]
call fcn.004b3900
mov eax, dword [esp + 0x28]
add esp, 4
cmp dword [eax + 0x1ac], 0
je 0x4c0895
push 0
push 1
push dword [edi + 0x74]
call dword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
mov eax, dword [esp + 0x24]
push esi
push edi
push eax
mov eax, dword [eax + 0x1ac]
call eax
mov eax, dword [esp + 0x30]
add esp, 0xc
mov ecx, dword [esp + 0x28]
cmp dword [eax + ecx*4 + 0x170], 0
je 0x4c1dbc
push 0xffffffffffffffff
push dword [edi + 0x74]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
jmp 0x4c0895
push 0
call dword [sym.imp.WS2_32.dll_htonl]
mov ecx, dword [esp + 0x40]
mov edx, dword [esp + 0x20]
mov dword [ecx + edx + 0xc], eax
push esi
call dword [sym.imp.WS2_32.dll_htons]
mov ecx, dword [esp + 0x50]
add ebx, 0xffff
mov edx, dword [esp + 0x30]
mov word [edx + ecx*2 + 0xe], ax
test bx, bx
jne 0x4c07d5
mov esi, dword [esp + 0x40]
push 0
call dword [sym.imp.WS2_32.dll_htonl]
mov ecx, dword [esp + 0x20]
cmp dword [esi + ecx + 0xc], eax
je 0x4c0a90
cmp dword [edi + 0x8c], 0
jne 0x4c0a90
mov eax, dword [esp + 0x1c]
lea eax, [eax + ebx*2]
add eax, 0x10
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x30]
movzx eax, word [eax + 2]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
and eax, 3
mov ecx, 4
sub ecx, eax
and ecx, reloc.WS2_32.dll_closesocket
jns 0x4c0913
dec ecx
or ecx, 0xfffffffc
inc ecx
mov eax, dword [esp + 0x30]
mov esi, dword [edi + 0xec]
sub esi, ecx
add esi, dword [edi + 0xe4]
movzx eax, word [eax + 2]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
movzx eax, ax
sub esi, eax
mov dword [edi + 0x90], 0
lea eax, [esi - 0x10]
mov dword [edi + 0x8c], eax
mov byte [eax + 0xc], 0x82
mov eax, dword [edi + 0x8c]
mov byte [eax + 0xd], 0
lea eax, [ebx*2 + 0x14]
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov ecx, dword [edi + 0x8c]
mov ebx, dword [esp + 0x30]
mov word [ecx + 0xe], ax
movzx eax, word [ebx + 2]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
mov ecx, dword [edi + 0x8c]
mov edx, 0x1000
movzx eax, ax
add ecx, 0x10
push eax
push ebx
call fcn.00401000
add esp, 8
jmp 0x4c040c
push 6
call dword [sym.imp.WS2_32.dll_htonl]
mov ecx, dword [esp + 0x20]
mov dword [esi + ecx + 0xc], eax
mov eax, dword [edi + 0x8c]
test eax, eax
je 0x4c09e6
mov ecx, dword [edi + 0xe4]
cmp eax, ecx
jb 0x4c09e6
mov eax, dword [edi + 0xec]
add eax, ecx
cmp dword [edi + 0x8c], eax
ja 0x4c09e6
push 2
call dword [sym.imp.WS2_32.dll_htonl]
mov ebx, dword [esp + 0x20]
mov dword [esi + ebx + 0xc], eax
jmp 0x4c0410
cmp dword [edi + 0x8c], 0
je 0x4c0a04
push 6
call dword [sym.imp.WS2_32.dll_htonl]
mov ebx, dword [esp + 0x20]
mov dword [esi + ebx + 0xc], eax
jmp 0x4c0410
mov ecx, dword [edi + 0xec]
lea eax, [ebx*2 + 4]
mov edx, dword [esp + 0x50]
mov dword [esp + 0x40], 0
mov word [esp + 0x42], ax
movzx eax, ax
sub ecx, eax
mov dword [esp + 0x58], eax
mov eax, dword [edi + 0xe4]
mov word [esp + 0x40], 0xff
mov dword [ecx + eax], edx
test ebx, ebx
je 0x4c0a81
mov esi, 4
nop dword [eax]
nop dword [eax + eax]
mov eax, dword [esp + 0x3c]
add eax, dword [esp + 0x38]
movzx eax, word [esi + eax + 0xc]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
mov ecx, dword [edi + 0xec]
lea esi, [esi + 2]
sub ecx, dword [esp + 0x58]
add ecx, dword [edi + 0xe4]
mov word [ecx + esi - 2], ax
sub ebx, 1
jne 0x4c0a50
mov eax, dword [esp + 0x40]
mov dword [edi + 0x8c], eax
jmp 0x4c040c
mov ebx, ecx
jmp 0x4c0410
mov ebx, dword [esp + 0x24]
cmp dword [ebx + 0x134], 0
je case.0x4c0317.2
cmp dword [edi + 0x70], 1
jne case.0x4c0317.2
push 0
push 1
push dword [edi + 0x74]
mov dword [edi + 0x70], 2
call dword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
mov eax, dword [ebx + 0x134]
push 1
push edi
push ebx
call eax
mov eax, dword [esp + 0x34]
add esp, 0xc
mov eax, dword [ebx + eax*4 + 0x170]
test eax, eax
je 0x4c1dbc
cmp dword [eax + 0x70], 0
je 0x4c1dbc
push 0xffffffffffffffff
push dword [edi + 0x74]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ecx, dword [esp + 0x18]
cmp esi, 0x14
jb 0x4c1d2e
cmp dword [esp + 0x28], 0xffffffff
je 0x4c1d2e
cmp dword [edi + 0x70], 1
jne 0x4c1d2e
mov eax, dword [ebp + 8]
push dword [ecx + eax + 0x10]
call dword [sym.imp.WS2_32.dll_ntohl]
dec eax
xor ebx, ebx
mov dword [edi + 0x60], eax
mov dword [edi + 0x64], eax
mov dword [edi + 0x9c], eax
mov eax, dword [esp + 0x14]
mov dword [esp + 0x3c], ebx
cmp eax, 0x14
jbe 0x4c1d32
mov eax, dword [esp + 0x18]
add eax, dword [ebp + 8]
mov dword [esp + 0x38], eax
nop
movzx eax, word [ebx + eax + 0x14]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
movzx esi, ax
mov eax, dword [esp + 0x38]
movzx eax, word [eax + ebx + 0x16]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
movzx ecx, ax
mov dword [esp + 0x40], ecx
cmp esi, 7
je 0x4c0c31
cmp esi, 0x8008
je 0x4c0ba7
cmp esi, 0xc000
jne 0x4c0bf5
mov ecx, dword [edi + 0x80]
mov edx, esi
push 1
call fcn.004b36e0
mov ecx, dword [esp + 0x44]
add esp, 4
jmp 0x4c0bf5
movzx ebx, cx
xor esi, esi
add ebx, 0xfffffffc
test ebx, ebx
jle 0x4c0bf1
mov eax, dword [esp + 0x3c]
mov ecx, dword [ebp + 8]
add eax, dword [esp + 0x18]
add ecx, 0x18
add eax, ecx
mov dword [esp + 0x60], eax
nop word [eax + eax]
movzx edx, byte [esi + eax]
mov ecx, dword [edi + 0x80]
push 1
call fcn.004b36e0
mov eax, dword [esp + 0x64]
inc esi
add esp, 4
cmp esi, ebx
jl 0x4c0bd0
mov ecx, dword [esp + 0x40]
mov ebx, dword [esp + 0x3c]
movzx edx, cx
mov ecx, 4
mov eax, edx
and eax, 3
sub ecx, eax
and ecx, reloc.WS2_32.dll_closesocket
jns 0x4c0c11
dec ecx
or ecx, 0xfffffffc
inc ecx
mov eax, dword [esp + 0x14]
add ecx, edx
add ebx, ecx
sub eax, ebx
mov dword [esp + 0x3c], ebx
cmp eax, 0x14
mov eax, dword [esp + 0x38]
jg 0x4c0b50
jmp 0x4c1d2e
mov edx, dword [edi + 0xe8]
push ecx
mov ecx, dword [esp + 0x30]
push 0
push 0xa
call fcn.004be800
mov ecx, dword [esp + 0x4c]
add esp, 0xc
movzx esi, cx
mov edx, 0x1000
sub edx, eax
mov dword [edi + 0xe8], eax
lea ecx, [esi - 4]
push ecx
mov ecx, dword [esp + 0x3c]
add ecx, 0x18
add ecx, ebx
push ecx
mov ecx, dword [esp + 0x34]
add ecx, eax
call fcn.00401000
mov eax, esi
mov ecx, 4
and eax, 3
add esp, 8
sub ecx, eax
and ecx, reloc.WS2_32.dll_closesocket
jns 0x4c0c91
dec ecx
or ecx, 0xfffffffc
inc ecx
add ecx, esi
add dword [edi + 0xe8], ecx
mov ecx, dword [esp + 0x40]
jmp 0x4c0bf5
cmp esi, 0x14
jb 0x4c1d2e
mov eax, dword [esp + 0x28]
cmp eax, 0xffffffff
je 0x4c1d2e
cmp dword [edi + 0x70], 1
jne 0x4c1d2e
mov esi, dword [ebp + 8]
mov dword [edi + 0x38], eax
mov eax, dword [esi + ecx + 4]
mov dword [edi + 0x4c], eax
test eax, eax
je 0x4c0258
push dword [esi + ecx + 8]
mov ebx, dword [sym.imp.WS2_32.dll_ntohl]
call ebx
mov dword [edi + 0x50], eax
mov eax, dword [esp + 0x18]
push dword [eax + esi + 0x10]
call ebx
dec eax
lea ebx, [edi + 0x5c]
push 4
push ebx
mov dword [edi + 0x60], eax
mov dword [edi + 0x64], eax
call fcn.004e2870
mov eax, dword [ebx]
add esp, 8
mov dword [edi + 0x98], eax
mov eax, dword [edi + 0x60]
mov dword [edi + 0x9c], eax
movzx eax, word [esi + 2]
mov esi, dword [sym.imp.WS2_32.dll_ntohs]
push eax
call esi
mov word [edi + 0x48], ax
mov eax, dword [ebp + 8]
movzx eax, word [eax]
push eax
call esi
mov ecx, dword [esp + 0x48]
mov word [edi + 0x4a], ax
mov eax, dword [esp + 0x18]
movzx eax, word [ecx + eax]
push eax
call esi
mov ecx, 0x400
cmp ax, cx
jae 0x4c0d61
mov ecx, dword [esp + 0x48]
mov eax, dword [esp + 0x18]
movzx eax, word [ecx + eax]
push eax
call esi
movzx eax, ax
jmp 0x4c0d63
mov eax, ecx
mov ecx, dword [ebp + 8]
mov word [edi + 0x8a], ax
mov eax, dword [esp + 0x18]
movzx eax, word [eax + ecx + 0xe]
push eax
call esi
mov ecx, 0x400
cmp ax, cx
jae 0x4c0d97
mov ecx, dword [ebp + 8]
mov eax, dword [esp + 0x18]
movzx eax, word [eax + ecx + 0xe]
push eax
call esi
movzx eax, ax
jmp 0x4c0d99
mov eax, ecx
xor edx, edx
mov word [edi + 0x88], ax
cmp dword [esp + 0x14], 0x14
mov dword [esp + 0x40], edx
jbe 0x4c0ea3
mov ebx, dword [ebp + 8]
lea eax, [ebx + 0x14]
add ebx, 0x16
add eax, dword [esp + 0x18]
add ebx, dword [esp + 0x18]
mov dword [esp + 0x5c], eax
mov dword [esp + 0x3c], ebx
jmp 0x4c0dd6
mov esi, dword [sym.imp.WS2_32.dll_ntohs]
movzx eax, word [edx + eax]
push eax
call esi
movzx esi, ax
mov eax, dword [esp + 0x40]
movzx eax, word [ebx + eax]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
movzx ecx, ax
mov dword [esp + 0x50], ecx
cmp esi, 0x8008
je 0x4c0e1e
cmp esi, 0xc000
jne 0x4c0e65
mov ecx, dword [edi + 0x80]
mov edx, esi
push 1
call fcn.004b36e0
mov ecx, dword [esp + 0x54]
add esp, 4
jmp 0x4c0e65
movzx ebx, cx
xor esi, esi
add ebx, 0xfffffffc
test ebx, ebx
jle 0x4c0e61
mov eax, dword [esp + 0x40]
mov ecx, dword [ebp + 8]
add eax, dword [esp + 0x18]
add ecx, 0x18
add eax, ecx
mov dword [esp + 0x60], eax
nop
movzx edx, byte [eax + esi]
mov ecx, dword [edi + 0x80]
push 1
call fcn.004b36e0
mov eax, dword [esp + 0x64]
inc esi
add esp, 4
cmp esi, ebx
jl 0x4c0e40
mov ecx, dword [esp + 0x50]
mov ebx, dword [esp + 0x3c]
movzx edx, cx
mov ecx, 4
mov eax, edx
and eax, 3
sub ecx, eax
and ecx, reloc.WS2_32.dll_closesocket
jns 0x4c0e81
dec ecx
or ecx, 0xfffffffc
inc ecx
mov eax, dword [esp + 0x14]
add ecx, edx
mov edx, dword [esp + 0x40]
add edx, ecx
sub eax, edx
mov dword [esp + 0x40], edx
cmp eax, 0x14
mov eax, dword [esp + 0x5c]
jg 0x4c0dd0
lea ebx, [edi + 0x5c]
call fcn.004b4150
mov esi, dword [esp + 0x2c]
mov ecx, esi
push 0x25
mov dword [esp + 0x70], edx
mov edx, dword [edi + 0xe8]
push 0
push 2
mov dword [esp + 0x74], eax
mov byte [esp + 0x1f], 0x82
call fcn.004be800
add dword [edi + 0xe8], 4
add esp, 0xc
mov ecx, dword [edi + 0xe8]
mov eax, dword [edi + 0x4c]
push 0x186a0
mov dword [ecx + esi], eax
mov esi, dword [sym.imp.WS2_32.dll_htonl]
call esi
mov ecx, dword [edi + 0xe8]
mov edx, dword [esp + 0x2c]
mov dword [edx + ecx + 4], eax
movzx eax, word [edi + 0x8a]
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov ecx, dword [edi + 0xe8]
mov edx, dword [esp + 0x2c]
mov word [edx + ecx + 8], ax
movzx eax, word [edi + 0x88]
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov ecx, dword [edi + 0xe8]
mov edx, dword [esp + 0x2c]
mov word [edx + ecx + 0xa], ax
push dword [ebx]
call esi
mov ecx, dword [edi + 0xe8]
mov ebx, dword [esp + 0x2c]
mov esi, dword [sym.imp.WS2_32.dll_htons]
push 8
mov dword [ebx + ecx + 0xc], eax
lea eax, [esp + 0x6c]
add dword [edi + 0xe8], 0x10
push eax
push 7
call esi
mov ecx, dword [edi + 0xe8]
mov edx, eax
add ecx, ebx
call fcn.004bfca0
add dword [edi + 0xe8], eax
add esp, 8
lea eax, [esp + 0x13]
push 1
push eax
push 0x8008
call esi
mov ecx, dword [edi + 0xe8]
mov edx, eax
add ecx, ebx
call fcn.004bfca0
add esp, 8
add dword [edi + 0xe8], eax
jmp 0x4c1d2e
mov eax, dword [ebp + 8]
mov dword [esp + 0x1c], 0
mov dword [esp + 0x38], 0
push dword [eax + ecx + 4]
call dword [sym.imp.WS2_32.dll_ntohl]
mov ecx, dword [esp + 0x48]
mov ebx, eax
mov eax, dword [esp + 0x18]
mov esi, dword [sym.imp.WS2_32.dll_ntohs]
mov dword [esp + 0x40], ebx
movzx ecx, word [ecx + eax]
push ecx
call esi
mov ecx, dword [ebp + 8]
movzx eax, ax
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x18]
movzx ecx, word [eax + ecx + 0xe]
push ecx
call esi
movzx esi, ax
xor eax, eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x58], eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x50], eax
mov eax, dword [edi + 0xbc]
mov dword [esp + 0x60], eax
mov dword [edi + 0xa4], 0
call fcn.004b4150
mov dword [edi + 0xa8], eax
mov eax, dword [edi + 0xa0]
test eax, eax
je 0x4c103e
cmp ebx, eax
jb 0x4c103e
mov dword [edi + 0xa0], 0
mov ebx, esi
test ebx, ebx
je 0x4c106e
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x30]
add ecx, 0x10
movzx esi, ax
lea esi, [ecx + esi*4]
add esi, dword [ebp + 8]
push dword [esi]
call dword [sym.imp.WS2_32.dll_ntohl]
mov dword [esp + 0x3c], eax
lea esi, [esi + 4]
sub ebx, 1
jne 0x4c1058
jmp 0x4c1072
mov eax, dword [esp + 0x3c]
mov ecx, dword [edi + 0xc0]
test ecx, ecx
je 0x4c1089
push dword [ecx + 0x22]
call dword [sym.imp.WS2_32.dll_ntohl]
mov dword [esp + 0x3c], eax
cmp dword [edi + 0xc0], 0
mov ebx, dword [esp + 0x50]
je 0x4c1213
nop word [eax + eax]
cmp eax, dword [esp + 0x40]
ja 0x4c11f5
mov eax, dword [edi + 0xc0]
cmp byte [eax + 6], 0
jne 0x4c1182
cmp dword [esp + 0x54], 0
jne 0x4c1182
mov eax, dword [eax + 0xe]
cmp dword [edi + 0xac], eax
jae 0x4c1182
mov ecx, dword [edi + 0xa8]
sub ecx, eax
js 0x4c1182
mov eax, dword [edi + 0x108]
movd xmm0, dword [edi + 0x10c]
sub eax, ecx
cdq
xor eax, edx
sub eax, edx
cvtdq2pd xmm0, xmm0
movd xmm1, eax
mulsd xmm0, qword [0x5f0ea8]
cvtdq2pd xmm1, xmm1
mulsd xmm1, qword [0x5f0e98]
addsd xmm1, xmm0
movd xmm0, ecx
cvtdq2pd xmm0, xmm0
cvttsd2si eax, xmm1
movd xmm1, dword [edi + 0x108]
mulsd xmm0, qword [0x5f0e90]
mov dword [edi + 0x10c], eax
cvtdq2pd xmm1, xmm1
mulsd xmm1, qword [0x5f0eb0]
addsd xmm1, xmm0
cvttsd2si ecx, xmm1
mov dword [edi + 0x108], ecx
lea eax, [ecx + eax*4]
mov ecx, 0x3e8
cmp eax, 0x3e8
cmovl eax, ecx
mov dword [edi + 0x110], eax
cmp eax, 0x1770
jle 0x4c117a
mov dword [edi + 0x110], 0x1770
mov dword [esp + 0x54], 1
mov eax, dword [edi + 0xc0]
add ebx, 0xffffffe4
mov esi, dword [edi + 0xc0]
movzx ecx, word [eax + 4]
mov eax, 0x1c
sub eax, ecx
add ebx, ecx
add dword [edi + 0xbc], eax
mov eax, 0xffff
add word [edi + 0xb8], ax
mov eax, dword [esi]
mov dword [edi + 0xc0], eax
test eax, eax
jne 0x4c11c4
mov dword [edi + 0xc4], eax
jmp 0x4c11d1
push dword [eax + 0x22]
call dword [sym.imp.WS2_32.dll_ntohl]
mov dword [esp + 0x3c], eax
push esi
call fcn.0058bf82
mov eax, dword [esp + 0x40]
add esp, 4
mov dword [edi + 0xb4], 0
cmp dword [edi + 0xc0], 0
jne 0x4c10a0
test ebx, ebx
je 0x4c120a
add dword [edi + 0x54], ebx
add dword [edi + 0x50], ebx
mov eax, dword [edi + 0x58]
cmp dword [edi + 0x54], eax
jle 0x4c120a
mov dword [edi + 0x54], eax
cmp dword [edi + 0xc0], 0
jne 0x4c122f
mov eax, dword [edi + 0x58]
mov dword [edi + 0x54], eax
mov dword [edi + 0x100], 0
mov dword [edi + 0x114], 0
jmp 0x4c1245
add dword [edi + 0x100], ebx
test ebx, ebx
jle 0x4c1245
mov eax, dword [edi + 0xa8]
mov dword [edi + 0x114], eax
mov ecx, dword [edi + 0x58]
mov eax, dword [edi + 0x104]
cmp ecx, eax
jg 0x4c1279
cmp dword [edi + 0xa0], 0
jne 0x4c1275
test ebx, ebx
je 0x4c1275
cmp ecx, 0x186a0
jge 0x4c1275
mov eax, 0x578
cmp ebx, eax
cmovl eax, ebx
add eax, ecx
jmp 0x4c1297
cmp ecx, eax
jle 0x4c129a
mov edx, dword [edi + 0x100]
cmp edx, ecx
jl 0x4c129a
cmp dword [esp + 0x60], ecx
jl 0x4c129a
lea eax, [ecx + 0x578]
sub edx, eax
mov dword [edi + 0x100], edx
mov dword [edi + 0x58], eax
mov esi, dword [edi + 0xc0]
test esi, esi
je 0x4c14dd
mov ebx, dword [ebp + 8]
mov eax, dword [esp + 0x30]
add ebx, 0x12
add ebx, dword [esp + 0x18]
movzx eax, ax
mov dword [esp + 0x30], eax
mov dword [esp + 0x3c], ebx
cmp dword [esp + 0x38], eax
jge 0x4c14c6
movzx eax, word [ebx - 2]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
movzx eax, ax
add eax, dword [esp + 0x40]
mov dword [esp + 0x60], eax
movzx eax, word [ebx]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
push dword [esi + 0x22]
movzx ebx, ax
add ebx, dword [esp + 0x44]
mov dword [esp + 0x60], ebx
call dword [sym.imp.WS2_32.dll_ntohl]
mov edx, eax
mov dword [esp + 0x50], edx
cmp edx, ebx
ja 0x4c14ab
mov bl, byte [esi + 7]
cmp edx, dword [esp + 0x60]
jae 0x4c1361
cmp bl, 0xfd
jae 0x4c1355
add bl, 1
cmp bl, 0xfd
jae 0x4c132e
lea eax, [ebx - 3]
cmp al, 0xf9
ja 0x4c1448
cmp dword [esp + 0x20], 0
jne 0x4c13ae
cmp dword [edi + 0xa0], 0
jne 0x4c13ae
mov eax, dword [edi + 0x58]
cmp eax, 0x2bc2
jl 0x4c1384
cdq
sub eax, edx
mov edx, dword [esp + 0x50]
mov ecx, eax
sar ecx, 1
jmp 0x4c1389
cmp bl, 0xfe
jne 0x4c1323
mov bl, 1
jmp 0x4c148a
cmp bl, 0xfd
jae 0x4c1323
movzx eax, word [esi + 4]
mov bl, 0xfe
sub eax, 0x1c
add dword [edi + 0x54], eax
movzx eax, word [esi + 4]
sub eax, 0x1c
add dword [edi + 0x100], eax
jmp 0x4c148a
mov ecx, 0x15e0
cmp dword [edi + 0x54], ecx
mov dword [edi + 0x104], ecx
mov dword [edi + 0x58], ecx
cmovl ecx, dword [edi + 0x54]
mov dword [edi + 0x54], ecx
mov dword [edi + 0x100], 0
mov dword [esp + 0x20], 1
or bl, 0xff
mov dword [esp + 0x58], edx
cmp dword [esp + 0x1c], 0
jne 0x4c140e
cmp esi, dword [edi + 0xc0]
je 0x4c13cd
cmp dword [edi + 0x114], 0
jne 0x4c13d9
mov eax, dword [edi + 0xa8]
mov dword [edi + 0x114], eax
mov eax, dword [edi + 0xa8]
mov edx, dword [esp + 0x28]
mov ecx, dword [esp + 0x24]
mov dword [edi + 0xac], eax
mov dword [esi + 0xe], eax
movzx eax, word [esi + 4]
push eax
lea eax, [esi + 0x12]
push eax
call fcn.004be770
add esp, 8
mov dword [esp + 0x1c], 1
inc byte [esi + 6]
jmp 0x4c148a
movzx eax, word [esi + 4]
cmp dword [edi + 0x54], eax
jl 0x4c148a
mov eax, dword [edi + 0xa8]
mov dword [esi + 0xe], eax
cmp dword [edi + 0x114], 0
jne 0x4c1435
mov eax, dword [edi + 0xa8]
mov dword [edi + 0x114], eax
movzx eax, word [esi + 4]
mov ecx, 0x1c
inc byte [esi + 6]
sub ecx, eax
add dword [edi + 0x54], ecx
jmp 0x4c1465
cmp bl, 0xff
jne 0x4c148a
movzx ecx, word [esi + 4]
cmp dword [edi + 0x54], ecx
jl 0x4c148a
mov eax, dword [edi + 0xa8]
inc byte [esi + 6]
mov dword [esi + 0xe], eax
sub dword [edi + 0x54], ecx
mov eax, dword [edi + 0xa8]
mov edx, dword [esp + 0x28]
mov ecx, dword [esp + 0x24]
mov dword [edi + 0xac], eax
movzx eax, word [esi + 4]
push eax
lea eax, [esi + 0x12]
push eax
call fcn.004be770
add esp, 8
mov byte [esi + 7], bl
mov esi, dword [esi]
test esi, esi
je 0x4c14ab
push dword [esi + 0x22]
call dword [sym.imp.WS2_32.dll_ntohl]
mov ebx, dword [esp + 0x5c]
mov edx, eax
mov dword [esp + 0x50], eax
jmp 0x4c1305
mov ebx, dword [esp + 0x3c]
inc dword [esp + 0x38]
add ebx, 4
mov eax, dword [esp + 0x30]
mov dword [esp + 0x3c], ebx
test esi, esi
jne 0x4c12c1
mov eax, dword [esp + 0x58]
test eax, eax
je 0x4c14dd
cmp dword [edi + 0xa0], 0
jne 0x4c14dd
mov dword [edi + 0xa0], eax
cmp dword [edi + 0x50], 0
movzx esi, word [edi + 0xc8]
mov dword [esp + 0x60], esi
jle 0x4c15e9
mov esi, dword [esp + 0x24]
nop word [eax + eax]
mov edx, dword [edi + 0xd0]
test edx, edx
je 0x4c15e5
movzx eax, word [edx + 4]
add eax, 0xffffffe4
cmp dword [edi + 0x50], eax
jl 0x4c15e5
cmp dword [edi + 0x54], eax
jl 0x4c15e5
mov eax, dword [edx]
mov dword [edi + 0xd0], eax
test eax, eax
jne 0x4c1539
mov dword [edi + 0xd4], eax
mov eax, 0xffff
add word [edi + 0xc8], ax
mov eax, dword [edi + 0xc4]
test eax, eax
jne 0x4c1557
mov dword [edi + 0xc0], edx
jmp 0x4c1559
mov dword [eax], edx
mov dword [edx], 0
mov ecx, 0x1c
inc word [edi + 0xb8]
mov dword [edi + 0xc4], edx
movzx eax, word [edx + 4]
sub eax, 0x1c
add dword [edi + 0xbc], eax
movzx eax, word [edx + 4]
sub ecx, eax
add dword [edi + 0x54], ecx
mov ecx, 0x1c
movzx eax, word [edx + 4]
sub ecx, eax
add dword [edi + 0x50], ecx
mov ecx, 0x1c
movzx eax, word [edx + 4]
sub ecx, eax
add dword [edi + 0xcc], ecx
cmp dword [edi + 0x114], 0
jne 0x4c15bb
mov eax, dword [edi + 0xa8]
mov dword [edi + 0x114], eax
mov eax, dword [edi + 0xa8]
mov ecx, esi
mov dword [edx + 0xe], eax
movzx eax, word [edx + 4]
push eax
lea eax, [edx + 0x12]
mov edx, dword [esp + 0x2c]
push eax
call fcn.004be770
add esp, 8
cmp dword [edi + 0x50], 0
jg 0x4c1500
mov esi, dword [esp + 0x60]
mov eax, dword [esp + 0x24]
cmp dword [eax + 0x13c], 0
je 0x4c1d2e
cmp word [edi + 0xc8], 0
jne 0x4c1d2e
test esi, esi
je 0x4c1d2e
push 0
push 1
push dword [edi + 0x74]
call dword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
push dword [edi + 0x34]
mov esi, dword [esp + 0x28]
push edi
push esi
mov eax, dword [esi + 0x13c]
call eax
mov eax, dword [esp + 0x34]
add esp, 0xc
mov eax, dword [esi + eax*4 + 0x170]
test eax, eax
je 0x4c1dbc
cmp dword [eax + 0x70], 2
jne 0x4c1dbc
push 0xffffffffffffffff
push dword [edi + 0x74]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
jmp 0x4c1d2e
mov ecx, dword [esp + 0x2c]
push esi
mov dword [edi + 0xb4], 0
mov edx, dword [edi + 0xe8]
push 0
push 5
call fcn.004be800
mov eax, dword [esp + 0x20]
add esp, 0xc
mov edx, dword [ebp + 8]
add eax, 0xfffffffc
mov ecx, dword [edi + 0xe8]
add edx, 4
push eax
mov eax, dword [esp + 0x1c]
add eax, edx
mov edx, 0xffc
sub edx, ecx
add ecx, 4
add ecx, dword [esp + 0x30]
push eax
call fcn.00401000
mov eax, dword [esp + 0x1c]
mov ecx, 4
and eax, 3
add esp, 8
sub ecx, eax
and ecx, reloc.WS2_32.dll_closesocket
jns 0x4c16cb
dec ecx
or ecx, 0xfffffffc
inc ecx
mov eax, dword [esp + 0x14]
add ecx, eax
add dword [edi + 0xe8], ecx
jmp 0x4c1d32
mov dword [edi + 0xb4], 0
jmp 0x4c1d2e
call fcn.004b4150
mov ecx, dword [esp + 0x18]
mov edx, dword [ebp + 8]
sub eax, dword [edx + ecx + 4]
mov dword [edi + 0x108], eax
mov ecx, dword [edi + 0x108]
cdq
sub eax, edx
mov dword [edi + 0x104], 0x15e0
sar eax, 1
mov dword [edi + 0x10c], eax
lea eax, [ecx + eax*4]
mov dword [edi + 0x110], eax
cmp eax, 0x3e8
jge 0x4c1736
mov dword [edi + 0x110], 0x3e8
mov edx, dword [edi + 0xe8]
mov ecx, dword [esp + 0x2c]
push 4
push 0
push 0xb
call fcn.004be800
mov esi, dword [esp + 0x30]
add esp, 0xc
mov dword [edi + 0xe8], eax
cmp dword [esi + 0x134], 0
je 0x4c1d2e
cmp dword [edi + 0x70], 1
jne 0x4c1d2e
push 0
push 1
push dword [edi + 0x74]
mov dword [edi + 0x70], 2
call dword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
mov eax, dword [esi + 0x134]
push 1
push edi
push esi
call eax
mov eax, dword [esp + 0x34]
add esp, 0xc
mov eax, dword [esi + eax*4 + 0x170]
test eax, eax
je 0x4c1dbc
cmp dword [eax + 0x70], 0
je 0x4c1dbc
push 0xffffffffffffffff
push dword [edi + 0x74]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
jmp 0x4c1d2e
mov eax, dword [ebp + 8]
movzx eax, word [ecx + eax + 2]
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov ecx, dword [ebp + 8]
movzx eax, ax
sub eax, 8
cdq
and edx, 3
lea ebx, [edx + eax]
mov eax, dword [esp + 0x18]
sar ebx, 2
mov dword [esp + 0x60], ebx
push dword [eax + ecx + 4]
call dword [sym.imp.WS2_32.dll_ntohl]
mov dword [esp + 0x58], eax
cmp eax, dword [edi + 0x60]
jbe 0x4c1d2e
mov ecx, dword [edi + 0xd8]
mov esi, dword [ecx + 0xc]
test esi, esi
je 0x4c183c
mov ebx, eax
nop
mov eax, dword [esi]
test eax, eax
je 0x4c1838
cmp dword [eax + 4], ebx
ja 0x4c1838
push eax
call fcn.0058bf82
add esp, 4
mov ecx, esi
call fcn.004b2ec0
mov eax, dword [edi + 0xd8]
mov esi, dword [eax + 0xc]
test esi, esi
jne 0x4c1810
mov ebx, dword [esp + 0x60]
test ebx, ebx
jle 0x4c1878
mov esi, dword [ebp + 8]
add esi, 8
add esi, dword [esp + 0x18]
nop word [eax + eax]
push dword [esi]
call dword [sym.imp.WS2_32.dll_ntohl]
mov ecx, dword [edi + 0x84]
mov edx, eax
call fcn.004b39c0
test eax, eax
je 0x4c1870
mov dword [eax + 4], 0xffffffff
add esi, 8
sub ebx, 1
jne 0x4c1850
mov eax, dword [esp + 0x58]
mov dword [edi + 0x60], eax
jmp 0x4c1d2e
mov eax, dword [ebp + 8]
push dword [eax + ecx + 4]
call dword [sym.imp.WS2_32.dll_ntohl]
mov bl, byte [esp + 0x44]
mov esi, eax
mov cl, bl
and cl, 3
cmp cl, 3
mov cl, bl
sete bh
shr cl, 2
and bh, cl
and bh, 1
je 0x4c1955
mov ecx, dword [ebp + 8]
mov eax, dword [esp + 0x18]
movzx eax, word [eax + ecx + 8]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
mov ecx, dword [ebp + 8]
movzx eax, ax
mov dword [esp + 0x58], eax
mov eax, dword [esp + 0x18]
push dword [eax + ecx + 0xc]
call dword [sym.imp.WS2_32.dll_ntohl]
mov ecx, dword [edi + 0x60]
inc ecx
mov dword [esp + 0x60], eax
cmp esi, ecx
jne 0x4c1901
mov ecx, dword [esp + 0x14]
mov edx, dword [ebp + 8]
add ecx, 0xfffffff0
push ecx
mov ecx, dword [esp + 0x1c]
add edx, 0x10
add ecx, edx
push ecx
push eax
jmp 0x4c193b
jbe 0x4c1955
mov eax, dword [esp + 0x18]
mov edx, 0x4bfff0
add eax, dword [ebp + 8]
mov ecx, dword [edi + 0xd8]
push eax
call fcn.004b2d90
add esp, 4
test eax, eax
jne 0x4c1955
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
add eax, 0xfffffff0
push eax
mov eax, dword [ebp + 8]
add eax, 0x10
add eax, ecx
push eax
push dword [esp + 0x68]
mov eax, dword [esp + 0x50]
mov edx, dword [esp + 0x34]
push eax
push ecx
push dword [esp + 0x6c]
mov ecx, dword [esp + 0x3c]
call fcn.004bef80
add esp, 0x18
mov eax, dword [edi + 0x60]
inc eax
cmp esi, eax
jne 0x4c1c5c
mov dword [edi + 0x60], esi
mov esi, dword [esp + 0x18]
add esi, dword [ebp + 8]
movzx eax, word [esi + 8]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
movzx eax, ax
mov dword [esp + 0x5c], 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]
test byte [edi + 0x94], 1
mov dword [esp + 0x60], eax
jne 0x4c1bd9
mov edx, dword [edi + 0x60]
lea ecx, [edx - 1]
cmp dword [edi + 0x64], ecx
jb 0x4c1bd9
mov eax, dword [edi + 0xd8]
mov dword [edi + 0x64], edx
mov esi, dword [eax + 0xc]
test esi, esi
je 0x4c19de
mov eax, dword [esi]
push dword [eax + 4]
call dword [sym.imp.WS2_32.dll_ntohl]
mov ecx, dword [edi + 0x60]
inc ecx
cmp eax, ecx
jne 0x4c19de
mov dword [edi + 0x60], eax
mov esi, dword [esi + 8]
test esi, esi
jne 0x4c19c1
cmp dword [esp + 0x34], 0
mov esi, dword [esp + 0x24]
jne 0x4c1a0f
push dword [edi + 0xe8]
mov edx, dword [esp + 0x2c]
mov ecx, esi
push dword [esp + 0x30]
mov dword [esp + 0x3c], 1
call fcn.004be860
add esp, 8
mov dword [edi + 0xe8], eax
test bh, bh
jne 0x4c1a76
push 0
push 1
push dword [edi + 0x74]
call dword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
add eax, 0xfffffff0
mov ebx, dword [esp + 0x28]
mov edx, ebx
push eax
mov eax, dword [ebp + 8]
add eax, 0x10
add eax, ecx
push eax
push dword [esp + 0x68]
push dword [esp + 0x50]
push ecx
push dword [esp + 0x70]
mov ecx, esi
call fcn.004bef80
mov eax, dword [esi + ebx*4 + 0x170]
add esp, 0x18
test eax, eax
je 0x4c1dbc
cmp dword [eax + 0x70], 0
je 0x4c1dbc
push 0xffffffffffffffff
push dword [edi + 0x74]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [edi + 0xd8]
xor ecx, ecx
mov dword [esp + 0x40], ecx
cmp dword [eax + 4], ecx
jle 0x4c1d2e
nop dword [eax + eax]
mov eax, dword [edi + 0xd8]
mov esi, dword [eax + 0xc]
test esi, esi
je 0x4c1aa1
mov esi, dword [esi]
jmp 0x4c1aa3
xor esi, esi
mov al, byte [esi + 1]
push dword [esi + 4]
mov byte [esp + 0x68], al
call dword [sym.imp.WS2_32.dll_ntohl]
movzx ecx, word [esi + 2]
mov ebx, eax
push ecx
call dword [sym.imp.WS2_32.dll_ntohs]
mov ecx, dword [edi + 0x60]
inc ecx
movzx eax, ax
mov dword [esp + 0x60], eax
cmp ebx, ecx
ja 0x4c1bbf
mov eax, dword [edi + 0x64]
inc eax
cmp ebx, eax
ja 0x4c1bbf
movzx eax, word [esi + 2]
add dword [esp + 0x40], eax
movzx eax, word [esi + 8]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
movzx eax, ax
mov dword [esp + 0x58], 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 + 0xd8]
mov dword [edi + 0x60], ebx
mov dword [edi + 0x64], ebx
mov dword [esp + 0x5c], eax
mov ecx, dword [ecx + 0xc]
test ecx, ecx
je 0x4c1b27
add ecx, 0x14
test byte [ecx], 1
jne 0x4c1b8f
push 0
push 1
push dword [edi + 0x74]
call dword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
mov ecx, dword [esp + 0x60]
mov ebx, dword [esp + 0x24]
mov edx, dword [esp + 0x28]
movzx eax, cx
sub eax, 0x10
push eax
lea eax, [esi + 0x10]
push eax
push dword [esp + 0x64]
push dword [esp + 0x70]
push ecx
push dword [esp + 0x6c]
mov ecx, ebx
call fcn.004bef80
mov eax, dword [esp + 0x40]
add esp, 0x18
mov eax, dword [ebx + eax*4 + 0x170]
test eax, eax
je 0x4c1dbc
cmp dword [eax + 0x70], 0
je 0x4c1dbc
push 0xffffffffffffffff
push dword [edi + 0x74]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push esi
call fcn.0058bf82
mov ecx, dword [edi + 0xd8]
add esp, 4
mov ecx, dword [ecx + 0xc]
call fcn.004b2ec0
test byte [edi + 0x94], 1
jne 0x4c1bbf
mov eax, dword [edi + 0xd8]
cmp dword [eax + 4], 0
jg 0x4c1a90
mov ecx, dword [esp + 0x40]
test ecx, ecx
jle 0x4c1d2e
mov eax, dword [edi + 0xd8]
sub dword [eax + 8], ecx
jmp 0x4c1d2e
mov ecx, dword [edi + 0xd8]
movzx eax, word [esi + 2]
add eax, dword [ecx + 8]
cmp eax, 0x186a0
jle 0x4c1bfa
mov dword [esp + 0x34], 2
jmp 0x4c1d2e
push ecx
push esi
push 0x4bff50
mov edx, 0x4bff20
call fcn.004b2c20
add esp, 0xc
mov esi, eax
cmp dword [esp + 0x34], 0
jne 0x4c1c3f
push dword [edi + 0xe8]
mov edx, dword [edi + 0x38]
push dword [edi + 0xe4]
mov ecx, dword [edi + 0x2c]
mov dword [esp + 0x3c], 1
call fcn.004be860
add esp, 8
mov dword [edi + 0xe8], eax
mov eax, dword [esp + 0x14]
test esi, esi
je 0x4c1d32
shr bl, 2
xor bl, byte [esi + 0x14]
and bl, 1
xor byte [esi + 0x14], bl
jmp 0x4c1d32
jbe 0x4c1ce6
mov edx, dword [esp + 0x18]
add edx, dword [ebp + 8]
mov ecx, dword [edi + 0xd8]
movzx eax, word [edx + 2]
add eax, dword [ecx + 8]
cmp eax, 0x186a0
jle 0x4c1c8a
mov dword [esp + 0x34], 2
jmp 0x4c1d2e
push ecx
push edx
push 0x4bff50
mov edx, 0x4bff20
call fcn.004b2c20
add esp, 0xc
mov esi, eax
cmp dword [esp + 0x34], 0
jne 0x4c1ccf
push dword [edi + 0xe8]
mov edx, dword [edi + 0x38]
push dword [edi + 0xe4]
mov ecx, dword [edi + 0x2c]
mov dword [esp + 0x3c], 1
call fcn.004be860
add esp, 8
mov dword [edi + 0xe8], eax
test esi, esi
je 0x4c1d2e
mov al, byte [esi + 0x14]
xor ecx, ecx
test bh, bh
setne cl
xor al, cl
and al, 1
xor byte [esi + 0x14], al
jmp 0x4c1d2e
cmp dword [esp + 0x34], 0
jne 0x4c1d2e
push dword [edi + 0xe8]
mov edx, dword [esp + 0x2c]
push dword [esp + 0x30]
mov ecx, dword [esp + 0x2c]
mov dword [esp + 0x3c], 1
call fcn.004be860
add esp, 8
mov dword [edi + 0xe8], eax
jmp 0x4c1d2e
mov eax, dword [ebp + 8]
test byte [ecx + eax], 0x40
mov ecx, 1
mov eax, dword [esp + 0x4c]
cmovne eax, ecx
mov dword [esp + 0x4c], eax
mov eax, dword [esp + 0x14]
and eax, 3
mov ecx, 4
sub ecx, eax
and ecx, reloc.WS2_32.dll_closesocket
jns 0x4c1d49
dec ecx
or ecx, 0xfffffffc
inc ecx
add ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
mov ebx, dword [ebp + 8]
add eax, ecx
mov dword [esp + 0x18], eax
add ebx, eax
jne 0x4c02b0
mov esi, dword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
mov ecx, dword [esp + 0x2c]
mov ebx, dword [esp + 0x28]
cmp ebx, 0xffffffff
je 0x4c1db3
mov eax, dword [edi + 0xe8]
cmp eax, 0xc
jle 0x4c1da9
test byte [ecx + 8], 4
je 0x4c1d94
push eax
push ecx
call fcn.004c0010
mov ecx, dword [esp + 0x34]
add esp, 8
push dword [edi + 0xe8]
mov edx, ebx
push ecx
mov ecx, dword [esp + 0x2c]
call fcn.004be770
add esp, 8
mov dword [edi + 0xe8], 0
push 0
push 1
push dword [edi + 0x74]
call esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
movzx eax, word [ebx + 2]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
push 0
sub ax, 4
mov dword [esp + 0x5c], 0
push 1
push dword [edi + 0x74]
movzx esi, ax
mov dword [esp + 0x70], esi
call dword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
xor eax, eax
cmp ax, si
jae 0x4c1e4a
movzx edi, ax
movzx eax, word [edi + ebx + 6]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
and eax, 3
mov esi, 4
sub esi, eax
and esi, reloc.WS2_32.dll_closesocket
jns 0x4c1e1b
dec esi
or esi, 0xfffffffc
inc esi
movzx eax, word [edi + ebx + 6]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
add ax, si
movzx esi, ax
movzx eax, word [edi + ebx + 4]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
mov eax, dword [esp + 0x58]
add eax, esi
mov dword [esp + 0x58], eax
cmp ax, word [esp + 0x64]
jb 0x4c1df5
mov edx, dword [esp + 0x28]
mov ecx, dword [esp + 0x24]
call fcn.004bf940
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0
push 1
push dword [edi + 0x74]
call dword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
mov edx, dword [esp + 0x28]
mov ecx, dword [esp + 0x24]
call fcn.004bf940
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret