Function at 0x57cb50
Capabilities:
Get socket status
Receive data
Receive data on socket
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x770
push ebx
push ebp
mov ebp, dword [esp + 0x77c]
xor eax, eax
push esi
push edi
mov dword [esp + 0x18], ecx
mov byte [esp + 0x16], al
mov dword [esp + 0x60], eax
mov dword [esp + 0x64], eax
mov byte [esp + 0x12], al
mov dword [esp + 0x7c], ebp
mov dword [esp + 0x78], 1
mov byte [esp + 0x14], al
mov dword [esp + 0x38], eax
jmp 0x57cb94
mov ebp, dword [esp + 0x784]
mov al, byte [esp + 0x14]
mov edi, dword [esp + 0x18]
test al, al
jne 0x57d2d3
lea eax, [esp + 0x60]
lea ecx, [esp + 0x78]
push eax
push 0
push 0
xor bl, bl
push ecx
push 0
mov byte [esp + 0x27], 0
mov byte [esp + 0x25], bl
mov dword [esp + 0x34], 0
call dword [sym.imp.WSOCK32.dll_select]
cmp eax, 0xffffffff
je 0x57cbdd
test eax, eax
je 0x57cbeb
mov byte [esp + 0x13], 1
jmp 0x57cbeb
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
or ecx, 0xffffffff
call fcn.0057d400
mov al, byte [esp + 0x788]
test al, al
mov al, byte [esp + 0x13]
jne 0x57cdbd
test al, al
jne 0x57ccca
mov al, byte [esp + 0x12]
test al, al
jne 0x57cc1e
push ebp
lea ecx, [edi + 0xa84]
call fcn.0057b9a0
mov byte [esp + 0x12], al
push 0
call dword [sym.imp.WSOCK32.dll_htonl]
push 0
call dword [sym.imp.WSOCK32.dll_htons]
lea edx, [esp + 0x68]
lea ecx, [edi + 0xa84]
push edx
call fcn.0057b9f0
mov eax, dword [edi + 0xabc]
lea esi, [edi + 0xaac]
test eax, eax
je 0x57cc68
mov ecx, dword [esi + 0x14]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x57cc64
cmp eax, 0x80
jne 0x57cc68
mov edx, esi
jmp 0x57cc6a
xor edx, edx
mov eax, dword [edx]
test eax, eax
mov dword [edx + 8], eax
je 0x57ccb4
mov eax, dword [eax]
test eax, eax
je 0x57ccb4
mov ecx, dword [eax + 0x20]
cmp ecx, 0xffffffff
je 0x57cc8f
cmp ebp, 0xffffffff
je 0x57cc8f
cmp ecx, ebp
sete cl
test cl, cl
jne 0x57cca8
mov eax, dword [edx + 8]
test eax, eax
je 0x57ccb4
mov eax, dword [eax + 4]
test eax, eax
mov dword [edx + 8], eax
je 0x57ccb4
mov eax, dword [eax]
test eax, eax
jne 0x57cc79
jmp 0x57ccb4
cmp word [eax + 0x1038], 4
jb 0x57ccb4
mov bl, 1
mov eax, dword [esi + 0x10]
test eax, eax
je 0x57ccc2
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
test bl, bl
je 0x57d2c1
mov byte [esp + 0x17], 0
mov al, byte [esp + 0x14]
test al, al
jne 0x57d2c1
push 0
mov dword [esp + 0x20], 0
mov word [esp + 0x2c], 2
call dword [sym.imp.WSOCK32.dll_htonl]
push 0
mov dword [esp + 0x30], eax
call dword [sym.imp.WSOCK32.dll_htons]
lea esi, [edi + 0xa78]
mov word [esp + 0x2a], ax
mov ecx, esi
call fcn.00563e70
mov ebx, eax
mov ecx, esi
mov dword [esp + 0x24], ebx
call fcn.0055bfc0
mov esi, eax
mov al, byte [esp + 0x788]
test al, al
mov dword [esp + 0x5c], 0x10
je 0x57cdca
lea edx, [esp + 0x5c]
lea eax, [esp + 0x28]
push edx
push eax
push 0
push esi
push ebx
push ebp
call dword [sym.imp.WSOCK32.dll_recvfrom]
mov ecx, dword [esp + 0x2a]
mov esi, eax
push ecx
mov dword [esp + 0x24], esi
call dword [sym.imp.WSOCK32.dll_ntohs]
lea edx, [esp + 0x28]
mov ecx, edi
push edx
push esi
push ebx
mov word [esp + 0x36], ax
call fcn.0057bf00
test al, al
jne 0x57d193
test esi, esi
mov byte [esp + 0x11], 1
mov dword [esp + 0x1c], esi
jle 0x57d193
mov ecx, dword [esp + 0x28]
push ebp
mov edx, dword [esp + 0x30]
sub esp, 0x10
mov eax, esp
mov dword [eax], ecx
mov ecx, dword [esp + 0x44]
mov dword [eax + 4], edx
mov edx, dword [esp + 0x48]
mov dword [eax + 8], ecx
lea ecx, [edi + 0xa84]
mov dword [eax + 0xc], edx
call fcn.0057b950
mov byte [esp + 0x12], al
jmp 0x57cfd4
test al, al
jne 0x57ccca
jmp 0x57d2c1
mov al, byte [esp + 0x13]
mov byte [esp + 0x15], 1
test al, al
je 0x57ce92
mov eax, dword [esp + 0x18]
lea edi, [eax + 0xaac]
mov eax, dword [eax + 0xabc]
test eax, eax
je 0x57ce09
mov ecx, dword [edi + 0x14]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x57ce05
cmp eax, 0x80
jne 0x57ce09
mov edx, edi
jmp 0x57ce0b
xor edx, edx
mov eax, dword [edx]
test eax, eax
mov dword [edx + 8], eax
je 0x57ce5d
mov eax, dword [eax]
test eax, eax
je 0x57ce5d
mov ecx, dword [eax + 0x20]
cmp ecx, 0xffffffff
je 0x57ce46
cmp ebp, 0xffffffff
je 0x57ce46
cmp ecx, ebp
sete cl
test cl, cl
je 0x57ce46
xor ecx, ecx
mov cx, word [eax + 0x1038]
mov eax, 0x1000
sub eax, ecx
cmp esi, eax
jl 0x57ce46
mov esi, eax
mov eax, dword [edx + 8]
test eax, eax
je 0x57ce5d
mov eax, dword [eax + 4]
test eax, eax
mov dword [edx + 8], eax
je 0x57ce5d
mov eax, dword [eax]
test eax, eax
jne 0x57ce1a
mov eax, dword [edi + 0x10]
test eax, eax
je 0x57ce6b
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
test esi, esi
jle 0x57ce92
mov edx, dword [esp + 0x24]
push 0
push esi
push edx
push ebp
mov byte [esp + 0x21], 1
call dword [sym.imp.WSOCK32.dll_recv]
test eax, eax
mov dword [esp + 0x20], eax
jle 0x57ce9a
mov byte [esp + 0x15], 0
jmp 0x57ce9a
mov al, byte [esp + 0x11]
test al, al
je 0x57ceb6
mov al, byte [esp + 0x12]
test al, al
jne 0x57ceb6
mov eax, dword [esp + 0x18]
push ebp
lea ecx, [eax + 0xa84]
call fcn.0057b9a0
mov byte [esp + 0x12], al
mov ecx, dword [esp + 0x18]
mov eax, dword [ecx + 0xabc]
lea ebx, [ecx + 0xaac]
test eax, eax
je 0x57cee4
mov edx, dword [ebx + 0x14]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x57cee0
cmp eax, 0x80
jne 0x57cee4
mov ecx, ebx
jmp 0x57cee6
xor ecx, ecx
mov eax, dword [ecx]
test eax, eax
mov dword [ecx + 8], eax
je 0x57cfba
mov edi, dword [eax]
test edi, edi
je 0x57cfba
mov eax, dword [edi + 0x20]
cmp eax, 0xffffffff
je 0x57cf1a
mov edx, dword [esp + 0x784]
cmp edx, 0xffffffff
je 0x57cf1a
cmp eax, edx
sete al
test al, al
jne 0x57cf3b
mov eax, dword [ecx + 8]
test eax, eax
je 0x57cfba
mov eax, dword [eax + 4]
test eax, eax
mov dword [ecx + 8], eax
je 0x57cfba
mov edi, dword [eax]
test edi, edi
jne 0x57cefd
jmp 0x57cfba
mov al, byte [esp + 0x11]
test al, al
je 0x57cf5e
mov eax, dword [esp + 0x20]
test eax, eax
jle 0x57cf5e
push eax
mov eax, dword [esp + 0x28]
push eax
lea ecx, [edi + 0x36]
call fcn.0057b550
mov byte [esp + 0x15], 1
xor ebp, ebp
mov bp, word [edi + 0x1038]
cmp ebp, 4
jl 0x57cfba
lea ecx, [esp + 0x17c]
lea esi, [edi + 0x36]
push 4
push ecx
mov ecx, esi
call fcn.0057b630
test al, al
je 0x57cfba
mov edx, dword [esp + 0x17e]
mov eax, dword [esp + 0x17c]
and edx, 0xffff
and eax, 0xffff
lea edi, [edx + eax + 4]
cmp ebp, edi
jl 0x57cfba
mov ecx, dword [esp + 0x24]
push edi
push ecx
mov ecx, esi
call fcn.0057b5c0
test al, al
je 0x57cfba
mov dword [esp + 0x1c], edi
mov eax, dword [ebx + 0x10]
test eax, eax
je 0x57cfc8
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov al, byte [esp + 0x15]
test al, al
je 0x57d193
mov eax, dword [esp + 0x1c]
test eax, eax
jle 0x57d193
cmp eax, 0x604
ja 0x57d198
mov esi, dword [esp + 0x24]
mov ecx, eax
mov edx, ecx
lea edi, [esp + 0x17c]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x17e]
mov edx, dword [esp + 0x17c]
and ecx, 0xffff
and edx, 0xffff
lea ecx, [ecx + edx + 4]
cmp eax, ecx
jne 0x57d198
mov esi, dword [esp + 0x18]
mov byte [esp + 0x16], 1
mov ecx, esi
call fcn.00584f90
fstp dword [esp + 0x1c]
lea edx, [esp + 0x28]
lea ecx, [esi + 0xa84]
push edx
call fcn.0057b9f0
mov eax, dword [esi + 0xabc]
add esi, 0xaac
test eax, eax
je 0x57d07a
mov ecx, dword [esi + 0x14]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x57d076
cmp eax, 0x80
jne 0x57d07a
mov ecx, esi
jmp 0x57d07c
xor ecx, ecx
mov eax, dword [ecx]
test eax, eax
mov dword [ecx + 8], eax
je 0x57d0ca
mov eax, dword [eax]
test eax, eax
je 0x57d0ca
mov dx, word [esp + 0x2a]
mov edi, dword [esp + 0x2c]
cmp dword [eax + 4], edi
jne 0x57d09f
cmp word [eax + 2], dx
je 0x57d0c3
cmp dword [eax + 0x14], edi
jne 0x57d0aa
cmp word [eax + 0x12], dx
je 0x57d0c3
mov eax, dword [ecx + 8]
test eax, eax
je 0x57d0ca
mov eax, dword [eax + 4]
test eax, eax
mov dword [ecx + 8], eax
je 0x57d0ca
mov eax, dword [eax]
test eax, eax
jne 0x57d094
jmp 0x57d0ca
mov edx, dword [esp + 0x1c]
mov dword [eax + 0x2c], edx
mov eax, dword [esi + 0x10]
test eax, eax
je 0x57d0d8
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov eax, dword [esp + 0x18]
mov dword [esp + 0x1c], 0xffffffff
lea ebp, [eax + 0xac8]
mov eax, dword [eax + 0xad8]
test eax, eax
je 0x57d10e
mov ecx, dword [ebp + 0x14]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x57d10a
cmp eax, 0x80
jne 0x57d10e
mov edi, ebp
jmp 0x57d110
xor edi, edi
mov eax, dword [edi]
test eax, eax
mov dword [edi + 8], eax
je 0x57d153
mov esi, dword [eax]
test esi, esi
je 0x57d153
lea edx, [esp + 0x28]
mov ecx, esi
push edx
call fcn.0057b840
test al, al
jne 0x57d148
mov eax, dword [edi + 8]
test eax, eax
je 0x57d153
mov eax, dword [eax + 4]
test eax, eax
mov dword [edi + 8], eax
je 0x57d153
mov esi, dword [eax]
test esi, esi
jne 0x57d11f
jmp 0x57d153
mov ecx, esi
call fcn.005871f0
mov dword [esp + 0x1c], eax
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x57d161
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov edi, dword [esp + 0x18]
mov ecx, edi
mov eax, dword [edi]
call dword [eax + 0x58]
mov esi, eax
test esi, esi
je 0x57d198
lea ecx, [esp + 0x17c]
push esi
push ecx
mov ecx, edi
call fcn.0057d660
mov edx, dword [esp + 0x1c]
push esi
mov ecx, edi
mov dword [esi + 4], edx
call fcn.00585400
jmp 0x57d198
mov byte [esp + 0x17], 1
mov al, byte [esp + 0x11]
test al, al
je case.0x57d249.10027
mov eax, dword [esp + 0x20]
cmp eax, 0xffffffff
je 0x57d231
test eax, eax
jne case.0x57d249.10027
push eax
mov word [esp + 0x40], 2
call dword [sym.imp.WSOCK32.dll_htonl]
push 0
mov dword [esp + 0x44], eax
call dword [sym.imp.WSOCK32.dll_htons]
mov esi, dword [esp + 0x18]
mov word [esp + 0x3e], ax
lea eax, [esp + 0x3c]
push eax
lea ecx, [esi + 0xa84]
call fcn.0057b9f0
mov edx, dword [esp + 0x3c]
push str.Closed_Gracefully
mov eax, dword [esp + 0x44]
sub esp, 0x10
mov ecx, esp
mov dword [ecx], edx
mov edx, dword [esp + 0x58]
mov dword [ecx + 4], eax
mov eax, dword [esp + 0x5c]
mov dword [ecx + 8], edx
mov dword [ecx + 0xc], eax
mov ecx, esi
call fcn.0057dff0
mov byte [esp + 0x14], 1
mov al, byte [esp + 0x17]
test al, al
jne 0x57d2c1
mov edi, dword [esp + 0x18]
mov ebp, dword [esp + 0x784]
jmp 0x57cccf
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
add eax, 0xffffd8e2
cmp eax, 0x4f
ja case.0x57d249.10027
xor ecx, ecx
mov cl, byte [eax + 0x57d3b0]
jmp dword [ecx*4 + 0x57d378]
mov al, byte [esp + 0x788]
test al, al
jne case.0x57d249.10027
mov esi, str.TCP_connection_reset
push 0
mov word [esp + 0x50], 2
call dword [sym.imp.WSOCK32.dll_htonl]
push 0
mov dword [esp + 0x54], eax
call dword [sym.imp.WSOCK32.dll_htons]
mov edi, dword [esp + 0x18]
mov word [esp + 0x4e], ax
lea eax, [esp + 0x4c]
push eax
lea ecx, [edi + 0xa84]
call fcn.0057b9f0
mov edx, dword [esp + 0x4c]
push esi
mov eax, dword [esp + 0x54]
sub esp, 0x10
mov ecx, esp
mov dword [ecx], edx
mov edx, dword [esp + 0x68]
mov dword [ecx + 4], eax
mov eax, dword [esp + 0x6c]
mov dword [ecx + 8], edx
mov dword [ecx + 0xc], eax
mov ecx, edi
call fcn.0057dff0
mov byte [esp + 0x14], 1
mov eax, dword [esp + 0x38]
inc eax
cmp eax, 1
mov dword [esp + 0x38], eax
jl 0x57cb8d
mov al, byte [esp + 0x16]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x770
ret 8
mov edx, dword [esp + 0x18]
push 0x200
lea ecx, [edx + 0xa78]
call fcn.005875c0
mov edi, dword [esp + 0x18]
mov ebp, dword [esp + 0x784]
jmp 0x57ccca
mov esi, str.Not_Initialised
jmp 0x57d260
mov esi, str.Network_Down
jmp 0x57d260
mov esi, str.Fault
jmp 0x57d260
mov esi, str.Not_Connected
jmp 0x57d260
mov esi, str.Network_Reset
jmp 0x57d260
mov esi, str.Not_Socket
jmp 0x57d260
mov esi, str.Not_Supported
jmp 0x57d260
mov esi, str.Shutdown
jmp 0x57d260
mov esi, str.Invalid
jmp 0x57d260
mov esi, str.Aborted
jmp 0x57d260
mov esi, str.Timed_Out
jmp 0x57d260