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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4bafac
mov eax, dword fs:[0]
push eax
sub esp, 0xc1c
mov eax, dword [0x4fc060]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 0x10]
mov esi, dword [0x5058f4]
push 0x400
mov edi, ecx
lea ecx, [ebp - 0x410]
push 0
push ecx
mov dword [ebp - 0xc28], eax
mov dword [ebp - 0xc20], esi
mov dword [ebp - 0xc18], 1
call fcn.0043c360
push 0x400
lea edx, [ebp - 0xc10]
push 0
push edx
call fcn.0043c360
mov eax, dword [0x4fc020]
mov edx, dword [eax + 0xc]
add esp, 0x18
mov ecx, 0x4fc020
call edx
add eax, 0x10
mov dword [ebp - 0xc14], eax
mov dword [ebp - 4], 0
test edi, edi
je 0x402ee3
test edi, 0xffff0000
jne 0x402ee7
movzx edi, di
push edi
call fcn.00401080
add esp, 4
test eax, eax
je 0x402f05
push eax
mov eax, edi
lea edi, [ebp - 0xc14]
call fcn.00405650
jmp 0x402f05
xor eax, eax
jmp 0x402ef9
mov eax, edi
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x402ef0
sub eax, edx
push edi
lea ebx, [ebp - 0xc14]
call fcn.004054e0
lea eax, [ebp - 0xc1c]
push str.USER
push eax
lea ecx, [ebp - 0xc14]
mov dword [ebp - 4], 1
call fcn.004051f0
lea ecx, [ebp - 0xc24]
push ecx
mov ecx, eax
mov byte [ebp - 4], 2
call fcn.004050e0
add esp, 0xc
mov byte [ebp - 4], 3
mov ecx, dword [eax]
mov edi, dword [ebp - 0xc14]
lea eax, [ecx - 0x10]
add edi, 0xfffffff0
cmp eax, edi
je 0x402f9a
cmp dword [edi + 0xc], 0
lea ebx, [edi + 0xc]
jl 0x402f8b
mov edx, dword [eax]
cmp edx, dword [edi]
jne 0x402f8b
call fcn.004055e0
mov esi, eax
or eax, 0xffffffff
lock xadd dword [ebx], eax
dec eax
test eax, eax
jg 0x402f7a
mov ecx, dword [edi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push edi
call eax
add esi, 0x10
mov dword [ebp - 0xc14], esi
mov esi, dword [ebp - 0xc20]
jmp 0x402f9a
mov eax, dword [ecx - 0xc]
push ecx
lea ebx, [ebp - 0xc14]
call fcn.004054e0
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0xc24]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x402fc0
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0xc1c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x402fe6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ebx, dword [ebp - 0xc14]
push ebx
lea ecx, [ebp - 0x410]
push 0x400
push ecx
call fcn.0043a0c3
lea eax, [ebp - 0x410]
add esp, 0xc
lea edx, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x403010
sub eax, edx
cmp dword [ebp + 0xc], 1
mov edi, eax
jne 0x403065
push esi
call fcn.00412820
add esp, 4
cmp eax, 1
jne 0x403040
push edi
lea edx, [ebp - 0x410]
push edx
push esi
call fcn.00410a00
add esp, 0xc
push esi
call fcn.00412820
add esp, 4
cmp eax, 1
jne 0x4030b5
push 0x3ff
lea ecx, [ebp - 0x810]
push ecx
push esi
call fcn.00410960
add esp, 0xc
jmp 0x40308e
mov esi, dword [ebp + 8]
push 0
push edi
lea eax, [ebp - 0x410]
push eax
push esi
call dword [sym.imp.WS2_32.dll_send]
push 0
push 0x3ff
lea edx, [ebp - 0x810]
push edx
push esi
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
js 0x4030b5
mov byte [ebp + eax - 0x810], 0
lea eax, [ebp - 0x810]
push eax
lea ecx, [ebp - 0xc10]
push 0x400
push ecx
call fcn.0043a0c3
add esp, 0xc
lea ecx, [ebp - 0xc10]
call fcn.00404550
cmp eax, 0x212
jne 0x4030d9
mov edx, dword [ebp - 0xc28]
mov dword [ebp - 0xc18], 0
mov dword [edx], eax
lea eax, [ebx - 0x10]
mov dword [ebp - 4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4030fc
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0xc18]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00439f9b
mov esp, ebp
pop ebp
ret