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

Disassembly:
sub esp, 0x60
push ebx
push edi
mov eax, ecx
mov dword [esp + 0x20], edx
push 0xc
xor ebx, ebx
mov dword [esp + 0x20], eax
pop ecx
mov edi, dword [eax + edx*4 + 0x174]
mov dword [esp + 0x18], ecx
mov dword [esp + 0x4c], ebx
mov dword [esp + 0x44], ebx
mov dword [esp + 0x34], ebx
cmp dword [esp + 0x70], ecx
jl 0x47cf42
test edi, edi
je 0x47cf42
push ebp
mov ebp, dword [esp + 0x70]
mov edx, ebp
push esi
push dword [esp + 0x78]
mov esi, dword [ebp + 8]
mov dword [ebp + 8], ebx
call fcn.0047fe85
pop ecx
cmp esi, eax
jne 0x47cf40
push 0xffffffffffffffff
push dword [edi + 0x7c]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [ebp + 4]
cmp dword [edi + 0x50], eax
je 0x47b51f
test eax, eax
jne 0x47cf34
mov esi, dword [edi + 0xec]
mov dword [esp + 0x18], esi
mov dword [esi + 8], ebx
mov dword [esi + 4], ebx
mov dword [esi], ebx
mov dword [edi + 0xf0], 0xc
add ebp, 0xc
je 0x47cef7
mov edx, dword [esp + 0x20]
lea eax, [edx + 4]
cmp eax, dword [esp + 0x78]
jg 0x47cef7
cmp dword [esp + 0x54], 0
jne 0x47cef7
mov al, byte [ebp]
mov byte [esp + 0x13], al
mov al, byte [ebp + 1]
mov byte [esp + 0x40], 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 0x47cef3
mov ecx, dword [esp + 0x20]
mov eax, esi
mov dword [esp + 0x14], eax
add eax, ecx
cmp eax, dword [esp + 0x78]
jg 0x47cef3
movzx eax, byte [esp + 0x13]
mov edx, 0x82
cmp eax, edx
ja 0x47cd66
je 0x47c603
cmp eax, 0xb
ja case.default.0x47b5bf
jmp dword [eax*4 + 0x47cf4b]
mov ebp, dword [esp + 0x24]
cmp dword [ebp + 0x138], ebx
je case.0x47b5bf.2
cmp dword [edi + 0x78], 1
jne case.0x47b5bf.2
push ebx
push 1
push dword [edi + 0x7c]
mov dword [edi + 0x78], 2
call dword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
push 1
push edi
push ebp
call dword [ebp + 0x138]
mov eax, dword [esp + 0x34]
add esp, 0xc
mov eax, dword [ebp + eax*4 + 0x174]
test eax, eax
je 0x47cf40
cmp dword [eax + 0x78], ebx
je 0x47cf40
push 0xffffffffffffffff
push dword [edi + 0x7c]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ecx, dword [esp + 0x20]
push 0x14
pop eax
cmp si, ax
jb 0x47b7aa
cmp dword [esp + 0x28], 0xffffffff
je 0x47b7aa
cmp dword [edi + 0x78], 1
jne 0x47b7aa
mov esi, dword [esp + 0x74]
push dword [ecx + esi + 0x10]
call dword [sym.imp.WS2_32.dll_ntohl]
dec eax
mov dword [esp + 0x48], ebx
mov dword [edi + 0x64], eax
mov ebp, ebx
mov dword [edi + 0x68], eax
mov dword [edi + 0xa4], eax
mov eax, dword [esp + 0x14]
cmp eax, 0x14
jbe 0x47ce45
mov eax, dword [esp + 0x20]
add eax, esi
mov dword [esp + 0x44], eax
movzx eax, word [eax + ebp + 0x14]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
movzx esi, ax
mov eax, dword [esp + 0x44]
movzx eax, word [eax + ebp + 0x16]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
movzx ecx, ax
mov dword [esp + 0x38], ecx
cmp esi, 7
je 0x47b70f
cmp esi, 0x8008
je 0x47b6d1
mov eax, 0xc000
cmp esi, eax
jne 0x47b775
mov ecx, dword [edi + 0x88]
mov edx, eax
push 1
call fcn.0047064e
pop ecx
jmp 0x47b771
movzx eax, cx
mov esi, ebx
add eax, 0xfffffffc
mov dword [esp + 0x50], eax
test eax, eax
jle 0x47b775
add ebp, dword [esp + 0x20]
mov ebx, eax
add ebp, dword [esp + 0x74]
movzx edx, byte [esi + ebp + 0x18]
mov ecx, dword [edi + 0x88]
push 1
call fcn.0047064e
inc esi
pop ecx
cmp esi, ebx
jl 0x47b6ef
mov ebp, dword [esp + 0x48]
xor ebx, ebx
jmp 0x47b771
mov edx, dword [edi + 0xf0]
push ecx
mov ecx, dword [esp + 0x1c]
push ebx
push 0xa
call fcn.00479e3b
mov ecx, dword [esp + 0x44]
mov edx, 0x1000
movzx esi, cx
sub edx, eax
mov dword [edi + 0xf0], eax
lea ecx, [esi - 4]
push ecx
mov ecx, dword [esp + 0x54]
add ecx, 0x18
add ecx, ebp
push ecx
mov ecx, dword [esp + 0x2c]
add ecx, eax
call section..text
add esp, 0x14
mov eax, esi
and eax, 3
push 4
pop ecx
sub ecx, eax
and ecx, reloc.WS2_32.dll_closesocket
jns 0x47b769
dec ecx
or ecx, 0xfffffffc
inc ecx
add ecx, esi
add dword [edi + 0xf0], ecx
mov ecx, dword [esp + 0x38]
movzx edx, cx
mov eax, edx
push 4
and eax, 3
pop ecx
sub ecx, eax
and ecx, reloc.WS2_32.dll_closesocket
jns 0x47b78f
dec ecx
or ecx, 0xfffffffc
inc ecx
mov eax, dword [esp + 0x14]
add ecx, edx
add ebp, ecx
sub eax, ebp
mov dword [esp + 0x48], ebp
cmp eax, 0x14
mov eax, dword [esp + 0x44]
jg 0x47b67c
mov esi, dword [esp + 0x18]
mov eax, dword [esp + 0x14]
push 4
and eax, 3
pop ecx
sub ecx, eax
and ecx, reloc.WS2_32.dll_closesocket
jns 0x47b7c7
dec ecx
or ecx, 0xfffffffc
inc ecx
add ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x20]
mov ebp, dword [esp + 0x74]
add edx, ecx
mov dword [esp + 0x20], edx
add ebp, edx
jne 0x47b548
jmp 0x47cef7
push 0x14
pop eax
cmp si, ax
jb 0x47b7aa
mov esi, dword [esp + 0x28]
cmp esi, 0xffffffff
je 0x47b7aa
cmp dword [edi + 0x78], 1
jne 0x47b7aa
mov ebp, dword [esp + 0x74]
mov dword [edi + 0x3c], esi
mov eax, dword [ecx + ebp + 4]
mov dword [edi + 0x50], eax
test eax, eax
je 0x47cf34
push dword [ecx + ebp + 8]
mov esi, dword [sym.imp.WS2_32.dll_ntohl]
call esi
mov dword [edi + 0x54], eax
mov eax, dword [esp + 0x20]
push dword [eax + ebp + 0x10]
call esi
dec eax
lea esi, [edi + 0x60]
push 4
mov dword [edi + 0x64], eax
mov dword [edi + 0x68], eax
pop eax
push eax
push esi
call fcn.004a39d0
mov eax, dword [esi]
mov esi, dword [sym.imp.WS2_32.dll_ntohs]
mov dword [edi + 0xa0], eax
mov eax, dword [edi + 0x64]
pop ecx
mov dword [edi + 0xa4], eax
movzx eax, word [ebp + 2]
pop ecx
push eax
call esi
mov word [edi + 0x4c], ax
movzx eax, word [ebp]
push eax
call esi
mov word [edi + 0x4e], ax
mov eax, dword [esp + 0x20]
movzx eax, word [eax + ebp + 0xc]
push eax
call esi
mov ecx, 0x400
cmp ax, cx
jae 0x47b896
mov eax, dword [esp + 0x20]
movzx eax, word [eax + ebp + 0xc]
push eax
call esi
movzx eax, ax
jmp 0x47b898
mov eax, ecx
mov word [edi + 0x92], ax
mov eax, dword [esp + 0x20]
movzx eax, word [eax + ebp + 0xe]
push eax
call esi
mov ecx, 0x400
cmp ax, cx
jae 0x47b8c6
mov eax, dword [esp + 0x20]
movzx eax, word [eax + ebp + 0xe]
push eax
call esi
movzx eax, ax
jmp 0x47b8c8
mov eax, ecx
push 0x14
mov word [edi + 0x90], ax
mov esi, ebx
pop eax
mov dword [esp + 0x44], esi
cmp dword [esp + 0x14], eax
jbe 0x47b9ac
lea eax, [ebp + 0x14]
add eax, dword [esp + 0x20]
mov dword [esp + 0x38], eax
movzx eax, word [eax + esi]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
movzx ebp, ax
mov eax, dword [esp + 0x20]
add eax, dword [esp + 0x74]
movzx eax, word [eax + esi + 0x16]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
movzx ecx, ax
mov dword [esp + 0x48], ecx
cmp ebp, 0x8008
je 0x47b939
mov eax, 0xc000
cmp ebp, eax
jne 0x47b975
mov ecx, dword [edi + 0x88]
mov edx, eax
push 1
call fcn.0047064e
pop ecx
jmp 0x47b971
movzx eax, cx
mov ebp, ebx
add eax, 0xfffffffc
mov dword [esp + 0x50], eax
test eax, eax
jle 0x47b975
add esi, dword [esp + 0x20]
mov ebx, eax
add esi, dword [esp + 0x74]
movzx edx, byte [esi + ebp + 0x18]
mov ecx, dword [edi + 0x88]
push 1
call fcn.0047064e
inc ebp
pop ecx
cmp ebp, ebx
jl 0x47b953
mov esi, dword [esp + 0x44]
xor ebx, ebx
mov ecx, dword [esp + 0x48]
movzx edx, cx
mov eax, edx
push 4
and eax, 3
pop ecx
sub ecx, eax
and ecx, reloc.WS2_32.dll_closesocket
jns 0x47b98f
dec ecx
or ecx, 0xfffffffc
inc ecx
mov eax, dword [esp + 0x14]
add ecx, edx
add esi, ecx
push 0x14
sub eax, esi
mov dword [esp + 0x48], esi
pop ecx
cmp eax, ecx
mov eax, dword [esp + 0x38]
jg 0x47b8ed
call fcn.00470e8d
mov esi, dword [esp + 0x18]
mov ecx, esi
push 0x25
mov dword [esp + 0x70], edx
mov edx, dword [edi + 0xf0]
push ebx
push 2
mov dword [esp + 0x74], eax
mov byte [esp + 0x1f], 0x82
call fcn.00479e3b
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 + 0x50]
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 + 0x60]
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 + 0x6c]
add dword [edi + 0xf0], 0x10
push eax
push 7
call ebp
mov ecx, dword [edi + 0xf0]
mov edx, eax
add ecx, esi
call fcn.0047afcf
add dword [edi + 0xf0], eax
lea eax, [esp + 0x1b]
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.0047afcf
add dword [edi + 0xf0], eax
pop ecx
pop ecx
jmp 0x47b7ae
mov esi, dword [esp + 0x74]
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x34], ebx
push dword [esi + ecx + 4]
call dword [sym.imp.WS2_32.dll_ntohl]
mov ebp, eax
mov eax, dword [esp + 0x20]
mov dword [esp + 0x44], 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 + 0x20]
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 + 0x38], ebx
mov dword [esp + 0x50], ebx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x48], ebx
mov dword [esp + 0x58], eax
mov dword [edi + 0xac], ebx
call fcn.00470e8d
mov dword [edi + 0xb0], eax
mov eax, dword [edi + 0xa8]
test eax, eax
je 0x47bb22
cmp ebp, eax
jb 0x47bb22
mov dword [edi + 0xa8], ebx
mov ebp, esi
test ebp, ebp
je 0x47bb53
mov ecx, dword [esp + 0x20]
mov eax, dword [esp + 0x30]
add ecx, 0x10
movzx esi, ax
lea esi, [ecx + esi*4]
add esi, dword [esp + 0x74]
push dword [esi]
call dword [sym.imp.WS2_32.dll_ntohl]
mov dword [esp + 0x38], eax
lea esi, [esi + 4]
sub ebp, 1
jne 0x47bb3d
jmp 0x47bb57
mov eax, dword [esp + 0x38]
mov ecx, dword [edi + 0xc8]
test ecx, ecx
je 0x47bb6e
push dword [ecx + 0x22]
call dword [sym.imp.WS2_32.dll_ntohl]
mov dword [esp + 0x38], eax
mov ebp, dword [esp + 0x48]
cmp dword [edi + 0xc8], ebx
je 0x47bce9
cmp eax, dword [esp + 0x44]
ja 0x47bccc
mov eax, dword [edi + 0xc8]
cmp byte [eax + 6], 0
jne 0x47bc5f
cmp dword [esp + 0x4c], 0
jne 0x47bc5f
mov eax, dword [eax + 0xe]
cmp dword [edi + 0xb4], eax
jae 0x47bc5f
mov ecx, dword [edi + 0xb0]
sub ecx, eax
js 0x47bc5f
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 [0x69edc0]
cvtdq2pd xmm1, xmm1
mulsd xmm1, qword [0x69edb0]
addsd xmm1, xmm0
movd xmm0, dword [edi + 0x110]
cvtdq2pd xmm0, xmm0
cvttsd2si eax, xmm1
mulsd xmm0, qword [0x69edc8]
mov dword [edi + 0x114], eax
movd xmm1, ecx
cvtdq2pd xmm1, xmm1
mulsd xmm1, qword [0x69eda8]
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 0x47bc57
mov dword [edi + 0x118], eax
mov dword [esp + 0x4c], 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 0x47bc9f
mov dword [edi + 0xcc], ebx
jmp 0x47bcac
push dword [eax + 0x22]
call dword [sym.imp.WS2_32.dll_ntohl]
mov dword [esp + 0x38], eax
push 1
push esi
call fcn.005cdee0
mov eax, dword [esp + 0x40]
pop ecx
mov dword [edi + 0xbc], ebx
pop ecx
cmp dword [edi + 0xc8], ebx
jne 0x47bb7e
test ebp, ebp
je 0x47bce1
add dword [edi + 0x58], ebp
add dword [edi + 0x54], ebp
mov eax, dword [edi + 0x5c]
cmp dword [edi + 0x58], eax
jle 0x47bce1
mov dword [edi + 0x58], eax
cmp dword [edi + 0xc8], ebx
jne 0x47bcfd
mov eax, dword [edi + 0x5c]
mov dword [edi + 0x58], eax
mov dword [edi + 0x108], ebx
mov dword [edi + 0x11c], ebx
jmp 0x47bd13
add dword [edi + 0x108], ebp
test ebp, ebp
jle 0x47bd13
mov eax, dword [edi + 0xb0]
mov dword [edi + 0x11c], eax
mov ecx, dword [edi + 0x5c]
mov eax, dword [edi + 0x10c]
cmp ecx, eax
jg 0x47bd48
cmp dword [edi + 0xa8], ebx
jne 0x47bd44
test ebp, ebp
je 0x47bd44
cmp ecx, 0x186a0
jge 0x47bd44
mov edx, 0x578
cmp ebp, edx
mov eax, edx
cmovl eax, ebp
add eax, ecx
jmp 0x47bd66
cmp ecx, eax
jle 0x47bd69
mov edx, dword [edi + 0x108]
cmp edx, ecx
jl 0x47bd69
cmp dword [esp + 0x58], ecx
jl 0x47bd69
lea eax, [ecx + 0x578]
sub edx, eax
mov dword [edi + 0x108], edx
mov dword [edi + 0x5c], eax
mov esi, dword [edi + 0xc8]
test esi, esi
je 0x47bfa3
mov ebp, dword [esp + 0x74]
mov eax, dword [esp + 0x30]
add ebp, 0x12
add ebp, dword [esp + 0x20]
movzx eax, ax
mov dword [esp + 0x30], eax
mov dword [esp + 0x48], ebp
cmp dword [esp + 0x34], eax
jge 0x47bf8d
movzx eax, word [ebp - 2]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
movzx eax, ax
add eax, dword [esp + 0x44]
mov dword [esp + 0x38], 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 + 0x48]
mov dword [esp + 0x5c], eax
call dword [sym.imp.WS2_32.dll_ntohl]
mov ebp, dword [esp + 0x58]
mov ecx, eax
cmp ecx, ebp
ja 0x47bf70
mov al, byte [esi + 7]
mov byte [esp + 0x13], al
cmp ecx, dword [esp + 0x38]
jae 0x47be09
cmp al, 0xfd
jae 0x47bdfd
inc al
mov byte [esp + 0x13], al
cmp al, 0xfd
jb 0x47be2d
mov al, 0xfc
jmp 0x47be03
cmp al, 0xfe
jne 0x47be2d
mov al, 1
mov byte [esp + 0x13], al
jmp 0x47be2d
cmp al, 0xfd
jae 0x47be2d
movzx eax, word [esi + 4]
sub eax, 0x1c
mov byte [esp + 0x13], 0xfe
add dword [edi + 0x58], eax
movzx eax, word [esi + 4]
sub eax, 0x1c
add dword [edi + 0x108], eax
mov al, byte [esp + 0x13]
sub al, 3
cmp al, 0xf9
ja 0x47bf11
cmp dword [esp + 0x2c], 0
jne 0x47be7c
cmp dword [edi + 0xa8], ebx
jne 0x47be7c
mov eax, dword [edi + 0x5c]
cmp eax, 0x2bc2
jl 0x47be57
cdq
sub eax, edx
sar eax, 1
jmp 0x47be5c
mov eax, 0x15e0
cmp dword [edi + 0x58], eax
mov dword [edi + 0x10c], eax
mov dword [edi + 0x5c], eax
cmovl eax, dword [edi + 0x58]
mov dword [edi + 0x58], eax
xor eax, eax
inc eax
mov dword [edi + 0x108], ebx
mov dword [esp + 0x2c], eax
cmp dword [esp + 0x1c], 0
mov byte [esp + 0x13], 0xff
mov dword [esp + 0x50], ecx
jne 0x47beda
cmp esi, dword [edi + 0xc8]
je 0x47be9c
cmp dword [edi + 0x11c], ebx
jne 0x47bea8
mov eax, dword [edi + 0xb0]
mov dword [edi + 0x11c], eax
mov eax, dword [edi + 0xb0]
mov edx, dword [esp + 0x28]
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.00479dc5
inc byte [esi + 6]
mov dword [esp + 0x24], 1
jmp 0x47bf53
movzx eax, word [esi + 4]
cmp dword [edi + 0x58], eax
jl 0x47bf55
mov eax, dword [edi + 0xb0]
mov dword [esi + 0xe], eax
cmp dword [edi + 0x11c], ebx
jne 0x47bf00
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 + 0x58], ecx
jmp 0x47bf31
mov al, byte [esp + 0x13]
cmp al, 0xff
jne 0x47bf59
movzx ecx, word [esi + 4]
cmp dword [edi + 0x58], ecx
jl 0x47bf59
mov eax, dword [edi + 0xb0]
inc byte [esi + 6]
mov dword [esi + 0xe], eax
sub dword [edi + 0x58], ecx
mov eax, dword [edi + 0xb0]
mov edx, dword [esp + 0x28]
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.00479dc5
pop ecx
pop ecx
mov al, byte [esp + 0x13]
mov byte [esi + 7], al
mov esi, dword [esi]
test esi, esi
je 0x47bf70
push dword [esi + 0x22]
call dword [sym.imp.WS2_32.dll_ntohl]
jmp 0x47bdd4
mov ebp, dword [esp + 0x48]
inc dword [esp + 0x34]
push 4
pop eax
add ebp, eax
mov eax, dword [esp + 0x30]
mov dword [esp + 0x48], ebp
test esi, esi
jne 0x47bd91
mov eax, dword [esp + 0x50]
test eax, eax
je 0x47bfa3
cmp dword [edi + 0xa8], ebx
jne 0x47bfa3
mov dword [edi + 0xa8], eax
movzx esi, word [edi + 0xd0]
mov dword [esp + 0x58], esi
cmp dword [edi + 0x54], ebx
jle 0x47c096
mov esi, dword [esp + 0x24]
push 0x1c
pop ebp
mov edx, dword [edi + 0xd8]
test edx, edx
je 0x47c092
movzx eax, word [edx + 4]
add eax, 0xffffffe4
cmp dword [edi + 0x54], eax
jl 0x47c092
cmp dword [edi + 0x58], eax
jl 0x47c092
mov eax, dword [edx]
mov dword [edi + 0xd8], eax
test eax, eax
jne 0x47bff7
mov dword [edi + 0xdc], ebx
mov eax, 0xffff
add word [edi + 0xd0], ax
mov eax, dword [edi + 0xcc]
test eax, eax
jne 0x47c015
mov dword [edi + 0xc8], edx
jmp 0x47c017
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 + 0x58], ecx
mov ecx, ebp
movzx eax, word [edx + 4]
sub ecx, eax
add dword [edi + 0x54], ecx
mov ecx, ebp
movzx eax, word [edx + 4]
sub ecx, eax
add dword [edi + 0xd4], ecx
cmp dword [edi + 0x11c], ebx
jne 0x47c06a
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 + 0x2c]
push eax
call fcn.00479dc5
pop ecx
pop ecx
cmp dword [edi + 0x54], ebx
jg 0x47bfbe
mov esi, dword [esp + 0x58]
mov eax, dword [esp + 0x24]
cmp dword [eax + 0x140], ebx
je 0x47b7aa
cmp word [edi + 0xd0], bx
jne 0x47b7aa
test esi, esi
je 0x47b7aa
push ebx
push 1
push dword [edi + 0x7c]
call dword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
push dword [edi + 0x38]
mov esi, dword [esp + 0x28]
push edi
push esi
call dword [esi + 0x140]
mov eax, dword [esp + 0x34]
add esp, 0xc
mov eax, dword [esi + eax*4 + 0x174]
test eax, eax
je 0x47cf40
cmp dword [eax + 0x78], 2
jne 0x47cf40
push 0xffffffffffffffff
push dword [edi + 0x7c]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
jmp 0x47b7aa
push esi
mov esi, dword [esp + 0x1c]
mov ecx, esi
mov dword [edi + 0xbc], ebx
mov edx, dword [edi + 0xf0]
push ebx
push 5
call fcn.00479e3b
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x2c]
add eax, 0xfffffffc
mov ecx, dword [edi + 0xf0]
add edx, 4
push eax
mov eax, dword [esp + 0x84]
add eax, edx
mov edx, 0xffc
sub edx, ecx
add ecx, 4
push eax
add ecx, esi
call section..text
mov eax, dword [esp + 0x28]
add esp, 0x14
and eax, 3
push 4
pop ecx
sub ecx, eax
and ecx, reloc.WS2_32.dll_closesocket
jns 0x47c16d
dec ecx
or ecx, 0xfffffffc
inc ecx
mov eax, dword [esp + 0x14]
add ecx, eax
add dword [edi + 0xf0], ecx
jmp 0x47b7b2
mov dword [edi + 0xbc], ebx
jmp 0x47b7aa
call fcn.00470e8d
mov ecx, dword [esp + 0x74]
mov edx, dword [esp + 0x20]
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 0x47c1d7
mov dword [edi + 0x118], eax
mov edx, dword [edi + 0xf0]
mov ecx, dword [esp + 0x18]
push 4
pop eax
push eax
push ebx
push 0xb
call fcn.00479e3b
mov esi, dword [esp + 0x30]
add esp, 0xc
mov dword [edi + 0xf0], eax
cmp dword [esi + 0x138], ebx
je 0x47b7aa
cmp dword [edi + 0x78], 1
jne 0x47b7aa
push ebx
push 1
push dword [edi + 0x7c]
mov dword [edi + 0x78], 2
call dword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
push 1
push edi
push esi
call dword [esi + 0x138]
mov eax, dword [esp + 0x34]
add esp, 0xc
mov eax, dword [esi + eax*4 + 0x174]
test eax, eax
je 0x47cf40
cmp dword [eax + 0x78], ebx
je 0x47cf40
jmp 0x47c0f6
mov esi, dword [esp + 0x74]
add esi, ecx
push dword [esi + 4]
call dword [sym.imp.WS2_32.dll_ntohl]
mov cl, byte [esp + 0x40]
mov ebp, eax
and cl, 3
cmp cl, 3
mov cl, byte [esp + 0x40]
sete al
shr cl, 2
and al, cl
and al, 1
mov byte [esp + 0x13], al
je 0x47c2f7
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 + 0x54], eax
call dword [sym.imp.WS2_32.dll_ntohl]
mov ecx, dword [edi + 0x64]
inc ecx
mov dword [esp + 0x58], eax
cmp ebp, ecx
jne 0x47c2b6
mov ecx, dword [esp + 0x14]
add ecx, 0xfffffff0
push ecx
lea ecx, [esi + 0x10]
push ecx
push eax
jmp 0x47c2de
jbe 0x47c2f7
mov ecx, dword [edi + 0xe0]
mov edx, 0x47b2dc
push esi
call fcn.0046fe77
pop ecx
test eax, eax
jne 0x47c2f7
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
push eax
lea eax, [esi + 0x10]
push eax
push dword [esp + 0x60]
push dword [esp + 0x4c]
mov edx, dword [esp + 0x38]
push ecx
push dword [esp + 0x64]
mov ecx, dword [esp + 0x3c]
call fcn.0047a4e7
add esp, 0x18
mov eax, dword [edi + 0x64]
inc eax
cmp ebp, eax
jne 0x47c592
mov dword [edi + 0x64], 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 + 0x50], 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 + 0x58], eax
jne 0x47c561
mov edx, dword [edi + 0x64]
lea ecx, [edx - 1]
cmp dword [edi + 0x68], ecx
jb 0x47c561
mov eax, dword [edi + 0xe0]
mov dword [edi + 0x68], edx
mov ebp, dword [eax + 0xc]
jmp 0x47c372
mov eax, dword [ebp]
push dword [eax + 4]
call dword [sym.imp.WS2_32.dll_ntohl]
mov ecx, dword [edi + 0x64]
inc ecx
cmp eax, ecx
jne 0x47c376
mov dword [edi + 0x64], eax
mov ebp, dword [ebp + 8]
test ebp, ebp
jne 0x47c358
cmp dword [esp + 0x3c], 0
mov ebp, dword [esp + 0x24]
jne 0x47c3a6
push dword [edi + 0xf0]
mov edx, dword [esp + 0x2c]
mov ecx, ebp
push dword [esp + 0x1c]
mov dword [esp + 0x44], 1
call fcn.00479e90
pop ecx
pop ecx
mov dword [edi + 0xf0], eax
cmp byte [esp + 0x13], 0
jne 0x47c405
push ebx
push 1
push dword [edi + 0x7c]
call dword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
mov ecx, dword [esp + 0x14]
lea eax, [ecx - 0x10]
push eax
lea eax, [esi + 0x10]
mov esi, dword [esp + 0x2c]
push eax
push dword [esp + 0x60]
mov edx, esi
push dword [esp + 0x4c]
push ecx
push dword [esp + 0x64]
mov ecx, ebp
call fcn.0047a4e7
mov eax, dword [ebp + esi*4 + 0x174]
add esp, 0x18
test eax, eax
je 0x47cf40
cmp dword [eax + 0x78], ebx
je 0x47cf40
push 0xffffffffffffffff
push dword [edi + 0x7c]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [edi + 0xe0]
mov dword [esp + 0x44], ebx
cmp dword [eax + 4], ebx
jle 0x47b7aa
mov eax, dword [edi + 0xe0]
mov esi, dword [eax + 0xc]
test esi, esi
je 0x47c429
mov esi, dword [esi]
jmp 0x47c42b
mov esi, ebx
mov al, byte [esi + 1]
push dword [esi + 4]
mov byte [esp + 0x60], al
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 + 0x64]
inc ecx
movzx eax, ax
mov dword [esp + 0x58], eax
cmp ebp, ecx
ja 0x47c543
mov eax, dword [edi + 0x68]
inc eax
cmp ebp, eax
ja 0x47c543
movzx eax, word [esi + 2]
add dword [esp + 0x44], eax
movzx eax, word [esi + 8]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
movzx eax, ax
mov dword [esp + 0x48], 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 [edi + 0x64], ebp
mov dword [edi + 0x68], ebp
mov dword [esp + 0x50], eax
mov ecx, dword [ecx + 0xc]
call fcn.0046ff59
test byte [eax], 1
jne 0x47c513
push ebx
push 1
push dword [edi + 0x7c]
call dword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
mov ecx, dword [esp + 0x58]
mov ebp, 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 + 0x58]
push dword [esp + 0x68]
push ecx
push dword [esp + 0x5c]
mov ecx, ebp
call fcn.0047a4e7
mov eax, dword [esp + 0x40]
add esp, 0x18
mov eax, dword [ebp + eax*4 + 0x174]
test eax, eax
je 0x47cf40
cmp dword [eax + 0x78], ebx
je 0x47cf40
push 0xffffffffffffffff
push dword [edi + 0x7c]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push 1
push esi
call fcn.005cdee0
pop ecx
pop ecx
mov ecx, dword [edi + 0xe0]
mov ecx, dword [ecx + 0xc]
call fcn.0046ffc4
test byte [edi + 0x9c], 1
jne 0x47c543
mov eax, dword [edi + 0xe0]
cmp dword [eax + 4], ebx
jg 0x47c418
mov ecx, dword [esp + 0x44]
mov esi, dword [esp + 0x18]
test ecx, ecx
jle 0x47b7ae
mov eax, dword [edi + 0xe0]
sub dword [eax + 8], ecx
jmp 0x47b7ae
lea eax, [esp + 0x3c]
mov edx, esi
push eax
mov ecx, edi
call fcn.0047b26d
pop ecx
test eax, eax
je 0x47b7aa
mov ecx, eax
call fcn.0046ff59
mov cl, byte [esp + 0x40]
shr cl, 2
xor cl, byte [eax]
and cl, 1
xor byte [eax], cl
jmp 0x47b7aa
jbe 0x47c5cb
lea eax, [esp + 0x3c]
mov edx, esi
push eax
mov ecx, edi
call fcn.0047b26d
pop ecx
test eax, eax
je 0x47b7aa
xor ebx, ebx
mov ecx, eax
cmp byte [esp + 0x13], bl
setne bl
call fcn.0046ff59
mov cl, byte [eax]
xor cl, bl
and cl, 1
xor byte [eax], cl
xor ebx, ebx
jmp 0x47b7aa
cmp dword [esp + 0x3c], 0
mov esi, dword [esp + 0x18]
jne 0x47b7ae
push dword [edi + 0xf0]
mov edx, dword [esp + 0x2c]
mov ecx, dword [esp + 0x28]
push esi
mov dword [esp + 0x44], 1
call fcn.00479e90
pop ecx
pop ecx
mov dword [edi + 0xf0], eax
jmp 0x47b7ae
mov esi, dword [esp + 0x74]
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 + 0x18]
movzx eax, ax
mov dword [esp + 0x48], ebp
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x64], eax
cmp eax, 4
jbe 0x47b7aa
lea ecx, [esi + 4]
add ecx, dword [esp + 0x20]
mov dword [esp + 0x34], 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 + 0x60], eax
movzx eax, word [esi]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
movzx eax, ax
sub eax, 0xd
je 0x47c8f1
sub eax, 1
je 0x47c6ef
dec eax
sub eax, 1
jne 0x47ccf9
mov edx, dword [edi + 0x94]
test edx, edx
je 0x47ccf9
cmp dl, 0xff
je 0x47ccf9
mov eax, dword [esi + 4]
cmp eax, dword [edx + 0x14]
jne 0x47ccf9
mov ecx, edi
call fcn.0047b03d
mov ecx, dword [edi + 0x30]
lea edx, [edi + 0x10]
mov esi, eax
mov ecx, dword [ecx + 0x24]
call fcn.0046fb73
push ebx
push 1
push dword [edi + 0x7c]
mov dword [edi + 0x94], ebx
call dword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
push edi
mov edx, 0x47b009
mov ecx, esi
call fcn.004708fd
pop ecx
push 0xffffffffffffffff
push dword [edi + 0x7c]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
jmp 0x47ccf9
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 + 0x2c], 0
movzx esi, ax
mov eax, dword [edi + 0x94]
mov dword [esp + 0x58], eax
mov eax, dword [esp + 0x1c]
je 0x47c77f
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 + 0x34]
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 + 0x58]
cmp al, 0xff
jne 0x47c75b
test ah, ah
jne 0x47c75b
xor eax, eax
inc eax
jmp 0x47c75d
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 + 0x1c]
add esi, 0xc
mov dword [esp + 0x1c], esi
jmp 0x47ccfd
movzx eax, ax
add eax, 4
add eax, ebp
push 0xd
mov dword [esp + 0x30], eax
call dword [sym.imp.WS2_32.dll_htons]
mov ecx, dword [esp + 0x2c]
mov word [ecx], ax
lea eax, [esi*2 + 0x10]
mov word [ecx + 2], ax
mov eax, dword [edi + 0x60]
dec eax
push eax
call dword [sym.imp.WS2_32.dll_htonl]
mov ecx, dword [esp + 0x2c]
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 + 0x2c]
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 + 0x2c]
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 0x47c80c
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 ecx, dword [esp + 0x2c]
mov word [ecx + 2], ax
test si, si
je 0x47ccf9
mov ebp, dword [esp + 0x34]
mov eax, esi
add ebp, 6
lea ecx, [ecx + eax*2]
add ecx, 0xe
add ebp, dword [esp + 0x30]
mov dword [esp + 0x44], 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 + 0x50], eax
movzx eax, ax
push 1
mov edx, eax
mov dword [esp + 0x5c], eax
call fcn.00470754
pop ecx
test eax, 0x8000
je 0x47c8bd
mov edx, dword [esp + 0x58]
mov ecx, dword [edi + 0x84]
push 1
call fcn.00470754
mov eax, dword [esp + 0x28]
pop ecx
cmp dword [eax + 0x1b0], ebx
je 0x47c8bd
push ebx
push 1
push dword [edi + 0x7c]
call dword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
push dword [esp + 0x50]
mov eax, dword [esp + 0x28]
push edi
push eax
call dword [eax + 0x1b0]
add esp, 0xc
push 0xffffffffffffffff
push dword [edi + 0x7c]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push dword [esp + 0x50]
call dword [sym.imp.WS2_32.dll_htons]
mov ecx, dword [esp + 0x44]
sub ebp, 2
mov word [ecx], ax
mov eax, 0xffff
add esi, eax
sub ecx, 2
mov dword [esp + 0x44], ecx
test si, si
jne 0x47c845
mov ebp, dword [esp + 0x48]
jmp 0x47ccf9
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x34]
movzx esi, ax
mov eax, dword [esp + 0x30]
mov dword [esp + 0x58], esi
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 + 0x38], eax
mov eax, dword [esp + 0x34]
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]
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 + 0x34]
mov ecx, dword [eax + ecx + 4]
mov eax, dword [esp + 0x1c]
add eax, 0xc
mov dword [esi + ebp + 8], ecx
cmp dword [esp + 0x2c], 0
mov dword [esp + 0x1c], eax
je 0x47c985
push 2
call dword [sym.imp.WS2_32.dll_htonl]
mov dword [esi + ebp + 0xc], eax
jmp 0x47ccf9
movzx eax, ax
add eax, 4
add eax, ebp
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x50]
cmp eax, dword [edi + 0x68]
ja 0x47cc27
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 + 0x2c]
mov word [ecx], ax
mov eax, dword [esp + 0x38]
lea eax, [eax*2 + 0x10]
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov ecx, dword [esp + 0x2c]
mov word [ecx + 2], ax
mov eax, dword [edi + 0x60]
dec eax
push eax
call dword [sym.imp.WS2_32.dll_htonl]
mov ecx, dword [esp + 0x2c]
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 + 0x2c]
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 + 0x2c]
mov dword [ecx + 8], eax
mov eax, dword [esp + 0x38]
test ax, ax
jne 0x47ca63
mov ecx, dword [edi + 0x80]
call fcn.00470811
push ebx
push 1
push dword [edi + 0x7c]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
push edi
mov edx, 0x47b009
mov ecx, esi
call fcn.004708fd
pop ecx
push 0xffffffffffffffff
push dword [edi + 0x7c]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov esi, dword [esp + 0x58]
jmp 0x47cb4c
movzx ecx, ax
mov eax, dword [esp + 0x30]
add eax, dword [esp + 0x34]
mov dword [esp + 0x44], 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 + 0x50], eax
movzx eax, ax
push 1
mov edx, eax
mov dword [esp + 0x5c], eax
call fcn.00470754
mov ebp, dword [esp + 0x4c]
pop ecx
test eax, 0x8000
je 0x47cb12
push 1
call dword [sym.imp.WS2_32.dll_htonl]
mov edx, dword [esp + 0x58]
mov dword [esi + ebp + 0xc], eax
mov ecx, dword [edi + 0x84]
push 1
call fcn.00470754
mov eax, dword [esp + 0x28]
pop ecx
cmp dword [eax + 0x1b0], ebx
je 0x47cb1d
push ebx
push 1
push dword [edi + 0x7c]
call dword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
push dword [esp + 0x50]
mov eax, dword [esp + 0x28]
push edi
push eax
call dword [eax + 0x1b0]
mov eax, dword [esp + 0x30]
add esp, 0xc
mov ecx, dword [esp + 0x28]
cmp dword [eax + ecx*4 + 0x174], ebx
je 0x47cf40
push 0xffffffffffffffff
push dword [edi + 0x7c]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
jmp 0x47cb1d
push ebx
call dword [sym.imp.WS2_32.dll_htonl]
mov dword [esi + ebp + 0xc], eax
push dword [esp + 0x50]
call dword [sym.imp.WS2_32.dll_htons]
mov ecx, dword [esp + 0x44]
mov edx, dword [esp + 0x2c]
mov word [edx + ecx*2 + 0xe], ax
mov ecx, 0xffff
mov eax, dword [esp + 0x38]
add eax, ecx
mov dword [esp + 0x38], eax
test ax, ax
jne 0x47ca63
push ebx
call dword [sym.imp.WS2_32.dll_htonl]
cmp dword [esi + ebp + 0xc], eax
je 0x47ccf9
cmp dword [edi + 0x94], ebx
jne 0x47ccf9
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x1c]
lea ecx, [ecx + eax*2]
mov eax, dword [esp + 0x2c]
add ecx, 0x10
mov dword [esp + 0x1c], 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 0x47cb9f
dec ecx
or ecx, 0xfffffffc
inc ecx
mov eax, dword [esp + 0x2c]
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 + 0x38]
lea eax, [eax*2 + 0x14]
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov ecx, dword [edi + 0x94]
mov esi, dword [esp + 0x2c]
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 0x47ccf9
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 0x47cc5b
mov ecx, dword [edi + 0xec]
cmp eax, ecx
jb 0x47cc5b
mov eax, dword [edi + 0xf4]
add eax, ecx
cmp dword [edi + 0x94], eax
jbe 0x47c974
cmp dword [edi + 0x94], ebx
je 0x47cc6a
push 6
jmp 0x47c976
mov edx, dword [esp + 0x38]
mov ecx, dword [edi + 0xec]
mov esi, dword [esp + 0x50]
mov dword [esp + 0x44], ebx
lea eax, [edx*2 + 4]
mov word [esp + 0x44], 0xff
mov word [esp + 0x46], ax
movzx eax, ax
sub ecx, eax
mov dword [esp + 0x38], eax
mov eax, dword [edi + 0xf4]
mov dword [ecx + eax], esi
movzx eax, dx
mov dword [esp + 0x58], eax
test eax, eax
je 0x47ccef
mov ebp, dword [esp + 0x58]
mov ebx, dword [esp + 0x38]
push 4
pop eax
mov esi, eax
mov eax, dword [esp + 0x34]
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 + 0xec]
mov ecx, dword [edi + 0xf4]
sub edx, ebx
add edx, esi
add esi, 2
mov word [edx + ecx], ax
sub ebp, 1
jne 0x47ccb9
mov ebp, dword [esp + 0x48]
xor ebx, ebx
mov eax, dword [esp + 0x44]
mov dword [edi + 0x94], eax
mov esi, dword [esp + 0x1c]
mov eax, dword [esp + 0x60]
movzx edx, ax
mov eax, edx
push 4
and eax, 3
pop ecx
sub ecx, eax
and ecx, reloc.WS2_32.dll_closesocket
jns 0x47cd1b
dec ecx
or ecx, 0xfffffffc
inc ecx
mov eax, dword [esp + 0x30]
add ecx, edx
add eax, ecx
mov ecx, dword [esp + 0x34]
mov dword [esp + 0x30], eax
add eax, 4
cmp eax, dword [esp + 0x64]
jl 0x47c648
test si, si
je 0x47b7aa
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
add dword [edi + 0xf0], eax
jmp 0x47b7aa
cmp eax, 0xc0
je 0x47cd88
mov eax, dword [esp + 0x74]
test byte [ecx + eax], 0x40
je 0x47b7aa
mov dword [esp + 0x54], 1
jmp 0x47b7aa
mov esi, dword [esp + 0x74]
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 + 0x20]
sar ebp, 2
mov dword [esp + 0x64], ebp
push dword [eax + esi + 4]
call dword [sym.imp.WS2_32.dll_ntohl]
mov dword [esp + 0x50], eax
cmp eax, dword [edi + 0x64]
jbe 0x47b7aa
mov ecx, dword [edi + 0xe0]
mov esi, dword [ecx + 0xc]
test esi, esi
je 0x47ce03
mov ebp, eax
mov eax, dword [esi]
test eax, eax
je 0x47cdff
cmp dword [eax + 4], ebp
ja 0x47cdff
push 1
push eax
call fcn.005cdee0
pop ecx
pop ecx
mov ecx, esi
call fcn.0046ffc4
mov eax, dword [edi + 0xe0]
mov esi, dword [eax + 0xc]
test esi, esi
jne 0x47cdd6
mov ebp, dword [esp + 0x64]
test ebp, ebp
jle 0x47ce39
mov esi, dword [esp + 0x74]
add esi, 8
add esi, dword [esp + 0x20]
push dword [esi]
call dword [sym.imp.WS2_32.dll_ntohl]
mov ecx, dword [edi + 0x8c]
mov edx, eax
push ebx
call fcn.00470754
pop ecx
test eax, eax
je 0x47ce31
or dword [eax + 4], 0xffffffff
add esi, 8
sub ebp, 1
jne 0x47ce12
mov eax, dword [esp + 0x50]
mov dword [edi + 0x64], eax
jmp 0x47b7aa
mov esi, dword [esp + 0x18]
jmp 0x47b7b2
movzx eax, word [ebp + 2]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
push 4
pop ecx
push ebx
sub ax, cx
push 1
push dword [edi + 0x7c]
movzx esi, ax
mov dword [esp + 0x84], esi
call dword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
xor eax, eax
cmp ax, si
jae 0x47cec9
movzx edi, bx
movzx eax, word [edi + ebp + 6]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
push 4
pop ecx
and eax, 3
mov esi, ecx
sub esi, eax
and esi, reloc.WS2_32.dll_closesocket
jns 0x47cea2
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
cmp bx, word [esp + 0x78]
jb 0x47ce7c
mov edx, dword [esp + 0x28]
mov ecx, dword [esp + 0x24]
pop esi
pop ebp
pop edi
pop ebx
add esp, 0x60
jmp fcn.0047ad3f
push ebx
push 1
push dword [edi + 0x7c]
call dword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
mov edx, dword [esp + 0x28]
mov ecx, dword [esp + 0x24]
jmp 0x47ced1
mov esi, dword [esp + 0x18]
mov ebp, dword [esp + 0x28]
cmp ebp, 0xffffffff
je 0x47cf34
mov eax, dword [edi + 0xf0]
cmp eax, 0xc
jle 0x47cf2e
test byte [esi + 8], 4
je 0x47cf1a
push eax
push esi
call fcn.0047b2f0
pop ecx
pop ecx
push dword [edi + 0xf0]
mov ecx, dword [esp + 0x28]
mov edx, ebp
push esi
call fcn.00479dc5
pop ecx
pop ecx
mov dword [edi + 0xf0], ebx
push ebx
push 1
push dword [edi + 0x7c]
call dword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
pop esi
pop ebp
pop edi
pop ebx
add esp, 0x60
ret