Function at 0x401860
Capabilities:
Get socket status
Print debug messages
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x96c
mov eax, dword [0x4a4300]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 0x3b8
lea eax, [ebp - 0x838]
mov esi, ecx
xorps xmm0, xmm0
mov dword [ebp - 0x95c], esi
push 0
push eax
movlpd qword [ebp - 0x840], xmm0
call fcn.004523e0
add esp, 0xc
lea edi, [esi*4 + 0x4a8c98]
lea ebx, [ebp - 0x840]
xor esi, esi
mov edi, edi
mov eax, dword [esi + 0x4a8b60]
or eax, dword [esi + 0x4a8b64]
je 0x40195b
mov ecx, dword [edi]
test ecx, ecx
je 0x40195b
cmp dword [esi + 0x4a8c70], 0
je 0x40195b
call fcn.00401460
mov dword [ebx + 0xc], eax
mov eax, dword [esi + 0x4a8b60]
mov dword [ebx], eax
mov eax, dword [esi + 0x4a8b64]
mov dword [ebx + 4], eax
mov eax, dword [esi + 0x4a8b68]
push 0x1ff
mov dword [ebx + 8], eax
lea eax, [ebp - 0x207]
push 0
push eax
mov byte [ebp - 0x208], 0
call fcn.004523e0
movzx eax, byte [edi + 3]
add esp, 0xc
push eax
movzx eax, byte [edi + 2]
push eax
movzx eax, byte [edi + 1]
push eax
movzx eax, byte [edi]
push eax
lea eax, [ebp - 0x208]
push 0x4826c4
push eax
call fcn.0045752f
add esp, 0x18
lea eax, [ebp - 0x208]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
lea eax, [ebp - 0x208]
push eax
call fcn.00458229
add esp, 4
add esi, 0x160
add ebx, 0x20
add edi, 0x160
cmp esi, 0x2940
jb 0x4018b0
xor eax, eax
lea ecx, [ebp - 0x7f4]
lea edx, [eax + 5]
cmp dword [ecx - 0x40], 0
je 0x401988
inc eax
cmp dword [ecx - 0x20], 0
je 0x40198f
inc eax
cmp dword [ecx], 0
je 0x401995
inc eax
cmp dword [ecx + 0x20], 0
je 0x40199c
inc eax
cmp dword [ecx + 0x40], 0
je 0x4019a3
inc eax
cmp dword [ecx + 0x60], 0
je 0x4019aa
inc eax
add ecx, 0xc0
dec edx
jne 0x401981
test eax, eax
je 0x401ed9
call fcn.0040fd80
mov dword [ebp - 0x954], eax
mov dword [ebp - 0x958], edx
mov ebx, dword [sym.imp.WS2_32.dll_WSAGetLastError]
lea eax, [ebp - 0x447]
push 0x3f
push 0
push eax
mov byte [ebp - 0x448], 0
call fcn.004523e0
add esp, 0xc
lea esi, [ebp - 0x834]
mov edi, 0x1e
mov eax, dword [esi]
test eax, eax
je 0x401a6d
push 0
push 0x40
lea ecx, [ebp - 0x448]
push ecx
push eax
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jne 0x401a23
push dword [esi]
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [esi], 0
jmp 0x401a6d
cmp eax, 0xffffffff
jne 0x401a4a
call ebx
cmp eax, 0x2733
je 0x401a6d
call ebx
cmp eax, 0x2749
je 0x401a6d
push dword [esi]
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [esi], 0
jmp 0x401a6d
cmp eax, 0x14
jne 0x401a6d
mov dword [esi + 0xc], 1
call fcn.0040fd80
sub eax, dword [ebp - 0x954]
mov dword [esi + 4], eax
sbb edx, dword [ebp - 0x958]
mov dword [esi + 8], edx
add esi, 0x20
dec edi
jne 0x4019f7
xor eax, eax
lea ecx, [ebp - 0x7f4]
lea edx, [edi + 5]
mov edi, edi
cmp dword [ecx - 0x40], 0
je 0x401a87
inc eax
cmp dword [ecx - 0x20], 0
je 0x401a8e
inc eax
cmp dword [ecx], 0
je 0x401a94
inc eax
cmp dword [ecx + 0x20], 0
je 0x401a9b
inc eax
cmp dword [ecx + 0x40], 0
je 0x401aa2
inc eax
cmp dword [ecx + 0x60], 0
je 0x401aa9
inc eax
add ecx, 0xc0
dec edx
jne 0x401a80
test eax, eax
je 0x401c06
call fcn.0040fd80
mov ebx, dword [ebp - 0x954]
sub eax, ebx
mov esi, dword [ebp - 0x958]
sbb edx, esi
mov dword [ebp - 0x964], edx
js 0x401af8
jg 0x401ade
cmp eax, 0x64
jbe 0x401af8
xor ecx, ecx
lea eax, [ebp - 0x828]
cmp dword [eax], 1
je 0x401c06
inc ecx
add eax, 0x20
cmp ecx, 0x1e
jb 0x401ae6
call fcn.0040fd80
sub eax, ebx
sbb edx, esi
test edx, edx
jg 0x401c06
jl 0x401b16
cmp eax, 0xbb8
ja 0x401c06
push 0x100
lea eax, [ebp - 0x10c]
push 0
push eax
call fcn.004523e0
add esp, 0xc
lea eax, [ebp - 0x94c]
xor esi, esi
mov dword [ebp - 0x110], esi
push 0x100
push esi
push eax
call fcn.004523e0
add esp, 0xc
lea edi, [ebp - 0x834]
xor edx, edx
lea ebx, [esi + 0x1e]
mov dword [ebp - 0x844], edx
mov dword [ebp - 0x950], edx
mov dword [ebp - 0x848], edx
mov dword [ebp - 0x844], 0x64
mov ecx, dword [edi]
test ecx, ecx
je 0x401bde
cmp dword [edi + 0xc], 1
je 0x401bde
xor eax, eax
test esi, esi
je 0x401b90
cmp dword [ebp + eax*4 - 0x10c], ecx
je 0x401b90
inc eax
cmp eax, esi
jb 0x401b82
cmp eax, esi
jne 0x401bad
cmp esi, 0x40
jae 0x401bad
mov dword [ebp + eax*4 - 0x10c], ecx
mov esi, dword [ebp - 0x110]
inc esi
mov dword [ebp - 0x110], esi
xor eax, eax
test edx, edx
je 0x401bc1
cmp dword [ebp + eax*4 - 0x94c], ecx
je 0x401bc1
inc eax
cmp eax, edx
jb 0x401bb3
cmp eax, edx
jne 0x401bde
cmp edx, 0x40
jae 0x401bde
mov dword [ebp + eax*4 - 0x94c], ecx
mov edx, dword [ebp - 0x950]
inc edx
mov dword [ebp - 0x950], edx
add edi, 0x20
dec ebx
jne 0x401b70
lea eax, [ebp - 0x848]
push eax
lea eax, [ebp - 0x950]
push eax
push ebx
lea eax, [ebp - 0x110]
push eax
push ebx
call dword [sym.imp.WS2_32.dll_select]
jmp 0x4019cc
xor esi, esi
lea ecx, [ebp - 0x840]
lea edx, [esi + 0x1e]
cmp dword [ecx + 0x18], 0
je 0x401c2f
test esi, esi
je 0x401c2d
mov eax, dword [ecx + 0x14]
cmp eax, dword [esi + 0x14]
jg 0x401c2f
jl 0x401c2d
mov eax, dword [ecx + 0x10]
cmp eax, dword [esi + 0x10]
jae 0x401c2f
mov esi, ecx
add ecx, 0x20
dec edx
jne 0x401c11
test esi, esi
je 0x401eb4
push 0x74
push edx
lea eax, [ebp - 0x47c]
mov dword [ebp - 0x480], edx
push eax
call fcn.004523e0
add esp, 0xc
lea edx, [ebp - 0x478]
lea ecx, [ebp - 0x810]
mov ebx, 5
cmp dword [ecx - 0x18], 0
je 0x401c89
mov edi, dword [esi + 0x10]
sub edi, dword [ecx - 0x20]
mov eax, dword [esi + 0x14]
sbb eax, dword [ecx - 0x1c]
test eax, eax
jg 0x401c89
jl 0x401c83
cmp edi, 0x14
ja 0x401c89
lea eax, [ecx - 0x30]
mov dword [edx - 8], eax
cmp dword [ecx + 8], 0
je 0x401cab
mov edi, dword [esi + 0x10]
sub edi, dword [ecx]
mov eax, dword [esi + 0x14]
sbb eax, dword [ecx + 4]
test eax, eax
jg 0x401cab
jl 0x401ca5
cmp edi, 0x14
ja 0x401cab
lea eax, [ecx - 0x10]
mov dword [edx - 4], eax
cmp dword [ecx + 0x28], 0
je 0x401ccd
mov edi, dword [esi + 0x10]
sub edi, dword [ecx + 0x20]
mov eax, dword [esi + 0x14]
sbb eax, dword [ecx + 0x24]
test eax, eax
jg 0x401ccd
jl 0x401cc8
cmp edi, 0x14
ja 0x401ccd
lea eax, [ecx + 0x10]
mov dword [edx], eax
cmp dword [ecx + 0x48], 0
je 0x401cf0
mov edi, dword [esi + 0x10]
sub edi, dword [ecx + 0x40]
mov eax, dword [esi + 0x14]
sbb eax, dword [ecx + 0x44]
test eax, eax
jg 0x401cf0
jl 0x401cea
cmp edi, 0x14
ja 0x401cf0
lea eax, [ecx + 0x30]
mov dword [edx + 4], eax
cmp dword [ecx + 0x68], 0
je 0x401d13
mov edi, dword [esi + 0x10]
sub edi, dword [ecx + 0x60]
mov eax, dword [esi + 0x14]
sbb eax, dword [ecx + 0x64]
test eax, eax
jg 0x401d13
jl 0x401d0d
cmp edi, 0x14
ja 0x401d13
lea eax, [ecx + 0x50]
mov dword [edx + 8], eax
cmp dword [ecx + 0x88], 0
je 0x401d3f
mov edi, dword [esi + 0x10]
sub edi, dword [ecx + 0x80]
mov eax, dword [esi + 0x14]
sbb eax, dword [ecx + 0x84]
test eax, eax
jg 0x401d3f
jl 0x401d39
cmp edi, 0x14
ja 0x401d3f
lea eax, [ecx + 0x70]
mov dword [edx + 0xc], eax
add ecx, 0xc0
add edx, 0x18
dec ebx
jne 0x401c66
xor ecx, ecx
lea edx, [ebp - 0x478]
lea esi, [ebx + 5]
lea ebx, [ebx]
mov eax, dword [edx - 8]
test eax, eax
je 0x401d6f
mov eax, dword [eax + 8]
cmp eax, ecx
cmovg ecx, eax
mov eax, dword [edx - 4]
test eax, eax
je 0x401d7e
mov eax, dword [eax + 8]
cmp eax, ecx
cmovg ecx, eax
mov eax, dword [edx]
test eax, eax
je 0x401d8c
mov eax, dword [eax + 8]
cmp eax, ecx
cmovg ecx, eax
mov eax, dword [edx + 4]
test eax, eax
je 0x401d9b
mov eax, dword [eax + 8]
cmp eax, ecx
cmovg ecx, eax
mov eax, dword [edx + 8]
test eax, eax
je 0x401daa
mov eax, dword [eax + 8]
cmp eax, ecx
cmovg ecx, eax
mov eax, dword [edx + 0xc]
test eax, eax
je 0x401db9
mov eax, dword [eax + 8]
cmp eax, ecx
cmovg ecx, eax
add edx, 0x18
dec esi
jne 0x401d60
xor ebx, ebx
mov edx, dword [ebp + esi*4 - 0x480]
test edx, edx
je 0x401de9
cmp dword [edx + 8], ecx
jne 0x401de9
test ebx, ebx
je 0x401de7
mov eax, dword [edx + 0x14]
cmp eax, dword [ebx + 0x14]
jg 0x401de9
jl 0x401de7
mov eax, dword [edx + 0x10]
cmp eax, dword [ebx + 0x10]
jae 0x401de9
mov ebx, edx
inc esi
cmp esi, 0x1e
jb 0x401dc1
test ebx, ebx
je 0x401eb4
mov edx, dword [ebx]
xor ecx, ecx
mov esi, dword [ebx + 4]
xor eax, eax
cmp dword [eax + 0x4a8b60], edx
jne 0x401e10
cmp dword [eax + 0x4a8b64], esi
je 0x401e1f
add eax, 0x160
inc ecx
cmp eax, 0x2940
jb 0x401e00
jmp 0x401e37
imul esi, ecx, 0x160
mov edi, 0x4ab6f8
mov ecx, 0x58
add esi, 0x4a8b60
rep movsd dword es:[edi], dword [esi]
push 0x1ff
lea eax, [ebp - 0x407]
mov byte [ebp - 0x408], 0
push 0
push eax
call fcn.004523e0
mov ecx, dword [ebp - 0x95c]
add esp, 0xc
movzx eax, byte [ecx*4 + 0x4ab833]
push eax
movzx eax, byte [ecx*4 + 0x4ab832]
push eax
movzx eax, byte [ecx*4 + 0x4ab831]
push eax
movzx eax, byte [ecx*4 + 0x4ab830]
push eax
push dword [ebx + 0x14]
lea eax, [ebp - 0x408]
push dword [ebx + 0x10]
push str._DEBUG___u__
push eax
call fcn.0045752f
add esp, 0x20
lea eax, [ebp - 0x408]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
lea eax, [ebp - 0x408]
push eax
call fcn.00458229
add esp, 4
lea esi, [ebp - 0x834]
mov edi, 0x1e
nop
mov eax, dword [esi]
test eax, eax
je 0x401ed3
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [esi], 0
add esi, 0x20
dec edi
jne 0x401ec0
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004516e1
mov esp, ebp
pop ebp
ret