Function at 0x487ae0
Capabilities:
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4f4598
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x38
push ebx
push esi
push edi
mov ebx, dword [ebp + 0xc]
xor eax, eax
cmp ebx, eax
mov dword [ebp - 4], eax
jne 0x487b0f
mov dword [ebp - 0x10], eax
jmp 0x487b41
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea edi, [eax + eax + 2]
mov eax, edi
add eax, 3
and al, 0xfc
call fcn.004ded50
mov esi, esp
push 0
push 0
push edi
push esi
push 0xffffffffffffffff
push ebx
push 0
push 0
mov byte [esi], 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov dword [ebp - 0x10], esi
mov edi, dword [ebp - 0x10]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebx, ecx
add ebx, 0x10
push ebx
call fcn.004de48f
mov ecx, ebx
mov esi, eax
mov edx, ecx
xor eax, eax
mov edi, esi
add esp, 4
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
push ebx
and ecx, 3
mov dword [ebp - 0x18], esi
rep stosb byte es:[edi], al
call sub.WS2_32.dll_htonl
push 0x411
mov dword [esi], eax
call sub.WS2_32.dll_htonl
mov edi, dword [ebp - 0x10]
mov dword [esi + 4], eax
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esi + 0xf]
mov eax, ecx
mov esi, edi
mov edi, edx
push 0
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push ebx
mov ebx, dword [ebp + 8]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [ebp - 0x18]
push esi
push ebx
call sub.WS2_32.dll_send
test eax, eax
jg 0x487bfd
test esi, esi
je 0x487bce
push esi
call fcn.004de3a6
add esp, 4
mov eax, dword [ebp + 0xc]
mov edx, dword [0x50d0e4]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x487bf5
lea esi, [eax - 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x487bf5
push esi
call fcn.004de3a6
add esp, 4
or eax, 0xffffffff
jmp 0x487ed3
test esi, esi
je 0x487c0a
push esi
call fcn.004de3a6
add esp, 4
push 0x268
call fcn.004de48f
add esp, 4
mov esi, eax
xor eax, eax
mov ecx, 0x9a
push eax
mov edi, esi
push 0x268
push esi
rep stosd dword es:[edi], eax
push ebx
mov dword [ebp - 0x18], esi
call sub.WS2_32.dll_recv
mov al, byte [esi + 8]
test al, al
je 0x487c58
test esi, esi
je 0x487c48
push esi
call fcn.004de3a6
add esp, 4
mov eax, dword [ebp + 0xc]
mov ecx, dword [0x50d0e4]
lea edx, [eax - 0xc]
cmp edx, ecx
jmp 0x487c80
mov eax, dword [esi]
push eax
call sub.WS2_32.dll_ntohl
cmp eax, 0x10
ja 0x487ca0
test esi, esi
je 0x487c72
push esi
call fcn.004de3a6
add esp, 4
mov eax, dword [ebp + 0xc]
mov edx, dword [0x50d0e4]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x487c99
lea esi, [eax - 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x487c99
push esi
call fcn.004de3a6
add esp, 4
xor eax, eax
jmp 0x487ed3
mov ecx, 0xa
xor eax, eax
lea edi, [ebp - 0x44]
add esi, 0x10
rep stosd dword es:[edi], eax
push 0x28
lea edx, [ebp - 0x44]
push esi
push edx
stosb byte es:[edi], al
call fcn.004de950
mov eax, dword [ebp + 0x18]
add esp, 0xc
test eax, eax
je 0x487cd2
push 0x28
push esi
push eax
call fcn.004de950
add esp, 0xc
mov eax, dword [esi + 0x34]
push eax
call sub.WS2_32.dll_ntohl
mov ecx, dword [esi + 0x38]
mov dword [ebp - 0x14], eax
push ecx
call sub.WS2_32.dll_ntohl
mov edx, dword [ebp - 0x14]
mov edi, eax
xor ebx, ebx
push 1
xor eax, eax
push ebx
push eax
push edx
call fcn.004df990
add edi, eax
push 0x516ae0
adc ebx, edx
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x10], ebx
lea ebx, [esi + 0x5f]
push ebx
call fcn.004df6d0
mov edx, eax
add esp, 8
test edx, edx
je 0x487d37
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov edi, edx
mov edx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov esi, ecx
add esi, 0x231
push esi
call fcn.004de48f
mov edx, eax
mov ecx, esi
xor eax, eax
mov edi, edx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, esi
push ebx
and ecx, 3
mov dword [ebp + 8], edx
rep stosb byte es:[edi], al
mov ecx, dword [ebp - 0x10]
lea eax, [ebp - 0x44]
push eax
mov eax, dword [ebp - 0x14]
push ecx
push eax
push str.qvod:___I64d_s_s_r_n
push edx
call fcn.004df42f
mov eax, dword [ebp + 0x10]
add esp, 0x1c
test eax, eax
je 0x487da1
mov ecx, dword [ebp + 8]
push ecx
push 0x50e960
push eax
call fcn.004deacb
add esp, 0xc
jmp 0x487e87
mov edi, dword [ebp + 8]
test edi, edi
je 0x487db3
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, eax
jmp 0x487db5
xor esi, esi
mov ebx, dword [ebp + 0x14]
mov eax, dword [ebx]
mov edx, dword [eax - 0xc]
lea ecx, [eax - 0xc]
cmp edx, 1
jg 0x487dca
cmp esi, dword [eax - 4]
jle 0x487e0a
mov edx, dword [0x50d0e4]
add eax, 0xfffffff4
cmp eax, edx
je 0x487df7
push ecx
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x487df0
mov edx, dword [ebx]
sub edx, 0xc
push edx
call fcn.004de3a6
add esp, 4
mov eax, dword [0x50d0e0]
mov dword [ebx], eax
push esi
mov ecx, ebx
call fcn.00402190
test eax, eax
je 0x487e87
mov edi, dword [ebp + 8]
lea eax, [esi + 1]
mov esi, dword [ebx]
test eax, eax
jne 0x487e17
test esi, esi
jne 0x487e31
push eax
push esi
push 0xffffffffffffffff
push edi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
jle 0x487e31
mov word [esi + eax*2 - 2], 0
mov esi, dword [ebx]
cmp dword [esi - 0xc], 1
jle 0x487e71
mov ecx, ebx
call fcn.00402350
mov ecx, dword [esi - 8]
push ecx
mov ecx, ebx
call fcn.00402190
test eax, eax
je 0x487e71
mov edi, dword [ebx]
mov edx, dword [esi - 8]
mov eax, dword [edi - 4]
lea ecx, [edx + edx + 2]
lea edx, [eax + eax + 2]
cmp edx, ecx
jb 0x487e71
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebx]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov edx, dword [ebx]
mov dword [edx - 8], eax
mov ecx, dword [ebx]
mov word [ecx + eax*2], 0
mov eax, dword [ebp + 8]
test eax, eax
je 0x487e97
push eax
call fcn.004de3a6
add esp, 4
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x487ea7
push eax
call fcn.004de3a6
add esp, 4
mov eax, dword [ebp + 0xc]
mov ecx, dword [0x50d0e4]
lea edx, [eax - 0xc]
cmp edx, ecx
je 0x487ece
lea esi, [eax - 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x487ece
push esi
call fcn.004de3a6
add esp, 4
mov eax, 1
mov ecx, dword [ebp - 0xc]
lea esp, [ebp - 0x50]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x14