Function at 0x4c0a70
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 0x4c265c
test edi, edi
je 0x4c265c
mov ebx, dword [ebp + 8]
mov edx, ebx
push eax
mov esi, dword [ebx + 8]
mov dword [ebx + 8], 0
call fcn.004c6530
add esp, 4
cmp esi, eax
jne 0x4c265c
push 0xffffffffffffffff
push dword [edi + 0x74]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [ebx + 4]
cmp dword [edi + 0x4c], eax
je 0x4c0b0c
test eax, eax
je 0x4c0b0c
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 0x4c260c
mov eax, 0xc
add eax, 4
cmp eax, dword [ebp + 0xc]
jg 0x4c2602
cmp dword [esp + 0x4c], 0
jne 0x4c2602
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 0x4c2602
mov ecx, dword [esp + 0x18]
mov eax, esi
mov dword [esp + 0x14], eax
add eax, ecx
cmp eax, dword [ebp + 0xc]
jg 0x4c2602
movzx eax, byte [esp + 0x13]
cmp eax, 0xc0
ja case.0x4c0bb7.12
movzx eax, byte [eax + 0x4c2754]
jmp dword [eax*4 + 0x4c2720]
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 0x4c25ce
mov ecx, dword [ebp + 8]
add ecx, 4
add ecx, dword [esp + 0x18]
mov dword [esp + 0x3c], ecx
jmp 0x4c0c17
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 0x4c0f13
sub eax, 1
je 0x4c0d1e
sub eax, 2
jne 0x4c0cac
mov edx, dword [edi + 0x8c]
test edx, edx
je 0x4c0cac
cmp dl, 0xff
je 0x4c0cac
mov eax, dword [ebx + 4]
cmp eax, dword [edx + 0x14]
jne 0x4c0cac
mov ecx, edi
call fcn.004c0620
mov ecx, dword [edi + 0x2c]
lea edx, [edi + 0x10]
mov esi, eax
mov ecx, dword [ecx + 0x20]
call fcn.004b3010
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.004c05f0
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 0x4c0cd4
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 0x4c0c13
test si, si
je 0x4c25ce
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 0x4c25ce
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 0x4c0db4
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 0x4c0d90
test ah, ah
jne 0x4c0d90
mov eax, 1
jmp 0x4c0d92
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 0x4c0cb4
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 0x4c0e33
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 0x4c0cac
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.004b40a0
add esp, 4
test eax, 0x8000
je 0x4c0edf
mov ecx, dword [edi + 0x7c]
mov edx, esi
push 1
call fcn.004b40a0
mov eax, dword [esp + 0x28]
add esp, 4
cmp dword [eax + 0x1ac], 0
je 0x4c0edf
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 0x4c0e70
jmp 0x4c0cac
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 0x4c0fa6
push 2
call dword [sym.imp.WS2_32.dll_htonl]
mov ebx, dword [esp + 0x20]
mov dword [esi + ebx + 0xc], eax
jmp 0x4c0cb0
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 0x4c123d
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 0x4c1075
mov ecx, dword [edi + 0x78]
call fcn.004b41b0
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.004c05f0
push 0xffffffffffffffff
push dword [edi + 0x74]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
jmp 0x4c1158
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.004b40a0
add esp, 4
test eax, 0x8000
je 0x4c1121
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.004b40a0
mov eax, dword [esp + 0x28]
add esp, 4
cmp dword [eax + 0x1ac], 0
je 0x4c1135
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 0x4c265c
push 0xffffffffffffffff
push dword [edi + 0x74]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
jmp 0x4c1135
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 0x4c1075
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 0x4c1330
cmp dword [edi + 0x8c], 0
jne 0x4c1330
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 0x4c11b3
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 0x4c0cac
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 0x4c1286
mov ecx, dword [edi + 0xe4]
cmp eax, ecx
jb 0x4c1286
mov eax, dword [edi + 0xec]
add eax, ecx
cmp dword [edi + 0x8c], eax
ja 0x4c1286
push 2
call dword [sym.imp.WS2_32.dll_htonl]
mov ebx, dword [esp + 0x20]
mov dword [esi + ebx + 0xc], eax
jmp 0x4c0cb0
cmp dword [edi + 0x8c], 0
je 0x4c12a4
push 6
call dword [sym.imp.WS2_32.dll_htonl]
mov ebx, dword [esp + 0x20]
mov dword [esi + ebx + 0xc], eax
jmp 0x4c0cb0
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 0x4c1321
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 0x4c12f0
mov eax, dword [esp + 0x40]
mov dword [edi + 0x8c], eax
jmp 0x4c0cac
mov ebx, ecx
jmp 0x4c0cb0
mov ebx, dword [esp + 0x24]
cmp dword [ebx + 0x134], 0
je case.0x4c0bb7.2
cmp dword [edi + 0x70], 1
jne case.0x4c0bb7.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 0x4c265c
cmp dword [eax + 0x70], 0
je 0x4c265c
push 0xffffffffffffffff
push dword [edi + 0x74]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ecx, dword [esp + 0x18]
cmp esi, 0x14
jb 0x4c25ce
cmp dword [esp + 0x28], 0xffffffff
je 0x4c25ce
cmp dword [edi + 0x70], 1
jne 0x4c25ce
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 0x4c25d2
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 0x4c14d1
cmp esi, 0x8008
je 0x4c1447
cmp esi, 0xc000
jne 0x4c1495
mov ecx, dword [edi + 0x80]
mov edx, esi
push 1
call fcn.004b3e80
mov ecx, dword [esp + 0x44]
add esp, 4
jmp 0x4c1495
movzx ebx, cx
xor esi, esi
add ebx, 0xfffffffc
test ebx, ebx
jle 0x4c1491
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.004b3e80
mov eax, dword [esp + 0x64]
inc esi
add esp, 4
cmp esi, ebx
jl 0x4c1470
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 0x4c14b1
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 0x4c13f0
jmp 0x4c25ce
mov edx, dword [edi + 0xe8]
push ecx
mov ecx, dword [esp + 0x30]
push 0
push 0xa
call fcn.004bf0a0
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 0x4c1531
dec ecx
or ecx, 0xfffffffc
inc ecx
add ecx, esi
add dword [edi + 0xe8], ecx
mov ecx, dword [esp + 0x40]
jmp 0x4c1495
cmp esi, 0x14
jb 0x4c25ce
mov eax, dword [esp + 0x28]
cmp eax, 0xffffffff
je 0x4c25ce
cmp dword [edi + 0x70], 1
jne 0x4c25ce
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 0x4c0af8
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.004e3140
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 0x4c1601
mov ecx, dword [esp + 0x48]
mov eax, dword [esp + 0x18]
movzx eax, word [ecx + eax]
push eax
call esi
movzx eax, ax
jmp 0x4c1603
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 0x4c1637
mov ecx, dword [ebp + 8]
mov eax, dword [esp + 0x18]
movzx eax, word [eax + ecx + 0xe]
push eax
call esi
movzx eax, ax
jmp 0x4c1639
mov eax, ecx
xor edx, edx
mov word [edi + 0x88], ax
cmp dword [esp + 0x14], 0x14
mov dword [esp + 0x40], edx
jbe 0x4c1743
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 0x4c1676
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 0x4c16be
cmp esi, 0xc000
jne 0x4c1705
mov ecx, dword [edi + 0x80]
mov edx, esi
push 1
call fcn.004b3e80
mov ecx, dword [esp + 0x54]
add esp, 4
jmp 0x4c1705
movzx ebx, cx
xor esi, esi
add ebx, 0xfffffffc
test ebx, ebx
jle 0x4c1701
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.004b3e80
mov eax, dword [esp + 0x64]
inc esi
add esp, 4
cmp esi, ebx
jl 0x4c16e0
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 0x4c1721
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 0x4c1670
lea ebx, [edi + 0x5c]
call fcn.004b48f0
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.004bf0a0
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.004c0540
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.004c0540
add esp, 8
add dword [edi + 0xe8], eax
jmp 0x4c25ce
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.004b48f0
mov dword [edi + 0xa8], eax
mov eax, dword [edi + 0xa0]
test eax, eax
je 0x4c18de
cmp ebx, eax
jb 0x4c18de
mov dword [edi + 0xa0], 0
mov ebx, esi
test ebx, ebx
je 0x4c190e
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 0x4c18f8
jmp 0x4c1912
mov eax, dword [esp + 0x3c]
mov ecx, dword [edi + 0xc0]
test ecx, ecx
je 0x4c1929
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 0x4c1ab3
nop word [eax + eax]
cmp eax, dword [esp + 0x40]
ja 0x4c1a95
mov eax, dword [edi + 0xc0]
cmp byte [eax + 6], 0
jne 0x4c1a22
cmp dword [esp + 0x54], 0
jne 0x4c1a22
mov eax, dword [eax + 0xe]
cmp dword [edi + 0xac], eax
jae 0x4c1a22
mov ecx, dword [edi + 0xa8]
sub ecx, eax
js 0x4c1a22
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 [0x5f1ea8]
cvtdq2pd xmm1, xmm1
mulsd xmm1, qword [0x5f1e98]
addsd xmm1, xmm0
movd xmm0, ecx
cvtdq2pd xmm0, xmm0
cvttsd2si eax, xmm1
movd xmm1, dword [edi + 0x108]
mulsd xmm0, qword [0x5f1e90]
mov dword [edi + 0x10c], eax
cvtdq2pd xmm1, xmm1
mulsd xmm1, qword [0x5f1eb0]
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 0x4c1a1a
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 0x4c1a64
mov dword [edi + 0xc4], eax
jmp 0x4c1a71
push dword [eax + 0x22]
call dword [sym.imp.WS2_32.dll_ntohl]
mov dword [esp + 0x3c], eax
push esi
call fcn.0058c812
mov eax, dword [esp + 0x40]
add esp, 4
mov dword [edi + 0xb4], 0
cmp dword [edi + 0xc0], 0
jne 0x4c1940
test ebx, ebx
je 0x4c1aaa
add dword [edi + 0x54], ebx
add dword [edi + 0x50], ebx
mov eax, dword [edi + 0x58]
cmp dword [edi + 0x54], eax
jle 0x4c1aaa
mov dword [edi + 0x54], eax
cmp dword [edi + 0xc0], 0
jne 0x4c1acf
mov eax, dword [edi + 0x58]
mov dword [edi + 0x54], eax
mov dword [edi + 0x100], 0
mov dword [edi + 0x114], 0
jmp 0x4c1ae5
add dword [edi + 0x100], ebx
test ebx, ebx
jle 0x4c1ae5
mov eax, dword [edi + 0xa8]
mov dword [edi + 0x114], eax
mov ecx, dword [edi + 0x58]
mov eax, dword [edi + 0x104]
cmp ecx, eax
jg 0x4c1b19
cmp dword [edi + 0xa0], 0
jne 0x4c1b15
test ebx, ebx
je 0x4c1b15
cmp ecx, 0x186a0
jge 0x4c1b15
mov eax, 0x578
cmp ebx, eax
cmovl eax, ebx
add eax, ecx
jmp 0x4c1b37
cmp ecx, eax
jle 0x4c1b3a
mov edx, dword [edi + 0x100]
cmp edx, ecx
jl 0x4c1b3a
cmp dword [esp + 0x60], ecx
jl 0x4c1b3a
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 0x4c1d7d
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 0x4c1d66
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 0x4c1d4b
mov bl, byte [esi + 7]
cmp edx, dword [esp + 0x60]
jae 0x4c1c01
cmp bl, 0xfd
jae 0x4c1bf5
add bl, 1
cmp bl, 0xfd
jae 0x4c1bce
lea eax, [ebx - 3]
cmp al, 0xf9
ja 0x4c1ce8
cmp dword [esp + 0x20], 0
jne 0x4c1c4e
cmp dword [edi + 0xa0], 0
jne 0x4c1c4e
mov eax, dword [edi + 0x58]
cmp eax, 0x2bc2
jl 0x4c1c24
cdq
sub eax, edx
mov edx, dword [esp + 0x50]
mov ecx, eax
sar ecx, 1
jmp 0x4c1c29
cmp bl, 0xfe
jne 0x4c1bc3
mov bl, 1
jmp 0x4c1d2a
cmp bl, 0xfd
jae 0x4c1bc3
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 0x4c1d2a
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 0x4c1cae
cmp esi, dword [edi + 0xc0]
je 0x4c1c6d
cmp dword [edi + 0x114], 0
jne 0x4c1c79
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.004bf010
add esp, 8
mov dword [esp + 0x1c], 1
inc byte [esi + 6]
jmp 0x4c1d2a
movzx eax, word [esi + 4]
cmp dword [edi + 0x54], eax
jl 0x4c1d2a
mov eax, dword [edi + 0xa8]
mov dword [esi + 0xe], eax
cmp dword [edi + 0x114], 0
jne 0x4c1cd5
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 0x4c1d05
cmp bl, 0xff
jne 0x4c1d2a
movzx ecx, word [esi + 4]
cmp dword [edi + 0x54], ecx
jl 0x4c1d2a
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.004bf010
add esp, 8
mov byte [esi + 7], bl
mov esi, dword [esi]
test esi, esi
je 0x4c1d4b
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 0x4c1ba5
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 0x4c1b61
mov eax, dword [esp + 0x58]
test eax, eax
je 0x4c1d7d
cmp dword [edi + 0xa0], 0
jne 0x4c1d7d
mov dword [edi + 0xa0], eax
cmp dword [edi + 0x50], 0
movzx esi, word [edi + 0xc8]
mov dword [esp + 0x60], esi
jle 0x4c1e89
mov esi, dword [esp + 0x24]
nop word [eax + eax]
mov edx, dword [edi + 0xd0]
test edx, edx
je 0x4c1e85
movzx eax, word [edx + 4]
add eax, 0xffffffe4
cmp dword [edi + 0x50], eax
jl 0x4c1e85
cmp dword [edi + 0x54], eax
jl 0x4c1e85
mov eax, dword [edx]
mov dword [edi + 0xd0], eax
test eax, eax
jne 0x4c1dd9
mov dword [edi + 0xd4], eax
mov eax, 0xffff
add word [edi + 0xc8], ax
mov eax, dword [edi + 0xc4]
test eax, eax
jne 0x4c1df7
mov dword [edi + 0xc0], edx
jmp 0x4c1df9
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 0x4c1e5b
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.004bf010
add esp, 8
cmp dword [edi + 0x50], 0
jg 0x4c1da0
mov esi, dword [esp + 0x60]
mov eax, dword [esp + 0x24]
cmp dword [eax + 0x13c], 0
je 0x4c25ce
cmp word [edi + 0xc8], 0
jne 0x4c25ce
test esi, esi
je 0x4c25ce
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 0x4c265c
cmp dword [eax + 0x70], 2
jne 0x4c265c
push 0xffffffffffffffff
push dword [edi + 0x74]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
jmp 0x4c25ce
mov ecx, dword [esp + 0x2c]
push esi
mov dword [edi + 0xb4], 0
mov edx, dword [edi + 0xe8]
push 0
push 5
call fcn.004bf0a0
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 0x4c1f6b
dec ecx
or ecx, 0xfffffffc
inc ecx
mov eax, dword [esp + 0x14]
add ecx, eax
add dword [edi + 0xe8], ecx
jmp 0x4c25d2
mov dword [edi + 0xb4], 0
jmp 0x4c25ce
call fcn.004b48f0
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 0x4c1fd6
mov dword [edi + 0x110], 0x3e8
mov edx, dword [edi + 0xe8]
mov ecx, dword [esp + 0x2c]
push 4
push 0
push 0xb
call fcn.004bf0a0
mov esi, dword [esp + 0x30]
add esp, 0xc
mov dword [edi + 0xe8], eax
cmp dword [esi + 0x134], 0
je 0x4c25ce
cmp dword [edi + 0x70], 1
jne 0x4c25ce
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 0x4c265c
cmp dword [eax + 0x70], 0
je 0x4c265c
push 0xffffffffffffffff
push dword [edi + 0x74]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
jmp 0x4c25ce
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 0x4c25ce
mov ecx, dword [edi + 0xd8]
mov esi, dword [ecx + 0xc]
test esi, esi
je 0x4c20dc
mov ebx, eax
nop
mov eax, dword [esi]
test eax, eax
je 0x4c20d8
cmp dword [eax + 4], ebx
ja 0x4c20d8
push eax
call fcn.0058c812
add esp, 4
mov ecx, esi
call fcn.004b3660
mov eax, dword [edi + 0xd8]
mov esi, dword [eax + 0xc]
test esi, esi
jne 0x4c20b0
mov ebx, dword [esp + 0x60]
test ebx, ebx
jle 0x4c2118
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.004b4160
test eax, eax
je 0x4c2110
mov dword [eax + 4], 0xffffffff
add esi, 8
sub ebx, 1
jne 0x4c20f0
mov eax, dword [esp + 0x58]
mov dword [edi + 0x60], eax
jmp 0x4c25ce
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 0x4c21f5
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 0x4c21a1
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 0x4c21db
jbe 0x4c21f5
mov eax, dword [esp + 0x18]
mov edx, 0x4c0890
add eax, dword [ebp + 8]
mov ecx, dword [edi + 0xd8]
push eax
call fcn.004b3530
add esp, 4
test eax, eax
jne 0x4c21f5
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.004bf820
add esp, 0x18
mov eax, dword [edi + 0x60]
inc eax
cmp esi, eax
jne 0x4c24fc
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 0x4c2479
mov edx, dword [edi + 0x60]
lea ecx, [edx - 1]
cmp dword [edi + 0x64], ecx
jb 0x4c2479
mov eax, dword [edi + 0xd8]
mov dword [edi + 0x64], edx
mov esi, dword [eax + 0xc]
test esi, esi
je 0x4c227e
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 0x4c227e
mov dword [edi + 0x60], eax
mov esi, dword [esi + 8]
test esi, esi
jne 0x4c2261
cmp dword [esp + 0x34], 0
mov esi, dword [esp + 0x24]
jne 0x4c22af
push dword [edi + 0xe8]
mov edx, dword [esp + 0x2c]
mov ecx, esi
push dword [esp + 0x30]
mov dword [esp + 0x3c], 1
call fcn.004bf100
add esp, 8
mov dword [edi + 0xe8], eax
test bh, bh
jne 0x4c2316
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.004bf820
mov eax, dword [esi + ebx*4 + 0x170]
add esp, 0x18
test eax, eax
je 0x4c265c
cmp dword [eax + 0x70], 0
je 0x4c265c
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 0x4c25ce
nop dword [eax + eax]
mov eax, dword [edi + 0xd8]
mov esi, dword [eax + 0xc]
test esi, esi
je 0x4c2341
mov esi, dword [esi]
jmp 0x4c2343
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 0x4c245f
mov eax, dword [edi + 0x64]
inc eax
cmp ebx, eax
ja 0x4c245f
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 0x4c23c7
add ecx, 0x14
test byte [ecx], 1
jne 0x4c242f
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.004bf820
mov eax, dword [esp + 0x40]
add esp, 0x18
mov eax, dword [ebx + eax*4 + 0x170]
test eax, eax
je 0x4c265c
cmp dword [eax + 0x70], 0
je 0x4c265c
push 0xffffffffffffffff
push dword [edi + 0x74]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push esi
call fcn.0058c812
mov ecx, dword [edi + 0xd8]
add esp, 4
mov ecx, dword [ecx + 0xc]
call fcn.004b3660
test byte [edi + 0x94], 1
jne 0x4c245f
mov eax, dword [edi + 0xd8]
cmp dword [eax + 4], 0
jg 0x4c2330
mov ecx, dword [esp + 0x40]
test ecx, ecx
jle 0x4c25ce
mov eax, dword [edi + 0xd8]
sub dword [eax + 8], ecx
jmp 0x4c25ce
mov ecx, dword [edi + 0xd8]
movzx eax, word [esi + 2]
add eax, dword [ecx + 8]
cmp eax, 0x186a0
jle 0x4c249a
mov dword [esp + 0x34], 2
jmp 0x4c25ce
push ecx
push esi
push 0x4c07f0
mov edx, 0x4c07c0
call fcn.004b33c0
add esp, 0xc
mov esi, eax
cmp dword [esp + 0x34], 0
jne 0x4c24df
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.004bf100
add esp, 8
mov dword [edi + 0xe8], eax
mov eax, dword [esp + 0x14]
test esi, esi
je 0x4c25d2
shr bl, 2
xor bl, byte [esi + 0x14]
and bl, 1
xor byte [esi + 0x14], bl
jmp 0x4c25d2
jbe 0x4c2586
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 0x4c252a
mov dword [esp + 0x34], 2
jmp 0x4c25ce
push ecx
push edx
push 0x4c07f0
mov edx, 0x4c07c0
call fcn.004b33c0
add esp, 0xc
mov esi, eax
cmp dword [esp + 0x34], 0
jne 0x4c256f
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.004bf100
add esp, 8
mov dword [edi + 0xe8], eax
test esi, esi
je 0x4c25ce
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 0x4c25ce
cmp dword [esp + 0x34], 0
jne 0x4c25ce
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.004bf100
add esp, 8
mov dword [edi + 0xe8], eax
jmp 0x4c25ce
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 0x4c25e9
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 0x4c0b50
mov esi, dword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
mov ecx, dword [esp + 0x2c]
mov ebx, dword [esp + 0x28]
cmp ebx, 0xffffffff
je 0x4c2653
mov eax, dword [edi + 0xe8]
cmp eax, 0xc
jle 0x4c2649
test byte [ecx + 8], 4
je 0x4c2634
push eax
push ecx
call fcn.004c08b0
mov ecx, dword [esp + 0x34]
add esp, 8
push dword [edi + 0xe8]
mov edx, ebx
push ecx
mov ecx, dword [esp + 0x2c]
call fcn.004bf010
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 0x4c26ea
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 0x4c26bb
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 0x4c2695
mov edx, dword [esp + 0x28]
mov ecx, dword [esp + 0x24]
call fcn.004c01e0
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.004c01e0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret