Function at 0x5701a0
Capabilities:
Get socket status
Receive data
Receive data on socket

Disassembly:
sub esp, 0x760
push ebx
xor eax, eax
push ebp
mov ebp, dword [esp + 0x76c]
push esi
push edi
mov ebx, ecx
mov byte [esp + 0x17], al
mov dword [esp + 0x60], eax
mov dword [esp + 0x64], eax
mov byte [esp + 0x13], al
mov dword [esp + 0x6c], ebp
mov dword [esp + 0x68], 1
mov byte [esp + 0x14], al
mov dword [esp + 0x38], eax
jmp 0x5701e7
mov ebp, dword [esp + 0x774]
cmp byte [esp + 0x14], 0
jne 0x5707de
lea eax, [esp + 0x60]
push eax
push 0
push 0
lea ecx, [esp + 0x74]
push ecx
push 0
mov byte [esp + 0x29], 0
mov byte [esp + 0x25], 0
mov byte [esp + 0x26], 0
mov dword [esp + 0x30], 0
call dword [sym.imp.ws2_32.dll_select]
cmp eax, 0xffffffff
je 0x57022f
test eax, eax
je 0x57023d
mov byte [esp + 0x15], 1
jmp 0x57023d
call dword [sym.imp.ws2_32.dll_WSAGetLastError]
or eax, 0xffffffff
call fcn.0056a780
cmp byte [esp + 0x778], 0
jne 0x5703be
cmp byte [esp + 0x15], 0
jne 0x5702db
cmp byte [esp + 0x13], 0
jne 0x57026d
push ebp
lea ecx, [ebx + 0xaac]
call fcn.0056ae50
mov byte [esp + 0x13], al
push 0
call dword [sym.imp.ws2_32.dll_htonl]
push 0
call dword [sym.imp.ws2_32.dll_htons_1]
lea edi, [ebx + 0xadc]
mov ecx, edi
call fcn.0056b560
mov esi, eax
mov ecx, esi
call fcn.004d3080
test eax, eax
je 0x5702c9
mov ecx, dword [eax + 0x20]
cmp ecx, 0xffffffff
je 0x5702ad
cmp ebp, 0xffffffff
je 0x5702ad
cmp ecx, ebp
sete cl
test cl, cl
jne 0x5702ba
mov ecx, esi
call fcn.004155b0
test eax, eax
jne 0x570297
jmp 0x5702c9
cmp word [eax + 0x4038], 2
jb 0x5702c9
mov byte [esp + 0x11], 1
mov ecx, edi
call fcn.0056b5c0
cmp byte [esp + 0x11], 0
je 0x5707ca
mov byte [esp + 0x11], 0
cmp byte [esp + 0x14], 0
jne 0x5707ca
push 0
mov dword [esp + 0x1c], 0
mov word [esp + 0x2c], 2
call dword [sym.imp.ws2_32.dll_htonl]
push 0
mov dword [esp + 0x30], eax
call dword [sym.imp.ws2_32.dll_htons_1]
cmp byte [esp + 0x778], 0
mov edi, dword [ebx + 0xaa0]
mov esi, dword [ebx + 0xaa4]
mov word [esp + 0x2a], ax
mov dword [esp + 0x24], edi
mov dword [esp + 0x3c], 0x10
je 0x5703ce
lea edx, [esp + 0x3c]
push edx
lea eax, [esp + 0x2c]
push eax
push 0
push esi
push edi
push ebp
call dword [sym.imp.ws2_32.dll_recvfrom]
mov ecx, dword [esp + 0x2a]
mov esi, eax
push ecx
mov dword [esp + 0x20], esi
call dword [sym.imp.ws2_32.dll_htons]
lea edx, [esp + 0x28]
push edx
push esi
push edi
mov ecx, ebx
mov word [esp + 0x36], ax
call fcn.0056fa60
test al, al
jne 0x5706b0
test esi, esi
mov byte [esp + 0x12], 1
mov edi, esi
jle 0x5706b0
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x2c]
push ebp
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, [ebx + 0xaac]
mov dword [eax + 0xc], edx
call fcn.0056ae00
mov byte [esp + 0x13], al
jmp 0x570551
cmp byte [esp + 0x15], 0
jne 0x5702db
jmp 0x5707ca
cmp byte [esp + 0x15], 0
mov byte [esp + 0x16], 1
je 0x57045d
lea ecx, [ebx + 0xadc]
call fcn.0056b560
mov ecx, eax
mov dword [esp + 0x20], eax
call fcn.004d3080
test eax, eax
je 0x57042f
mov ecx, dword [eax + 0x20]
cmp ecx, 0xffffffff
je 0x570422
cmp ebp, 0xffffffff
je 0x570422
cmp ecx, ebp
sete cl
test cl, cl
je 0x570422
movzx ecx, word [eax + 0x4038]
mov eax, 0x4000
sub eax, ecx
cmp esi, eax
jl 0x570422
mov esi, eax
mov ecx, dword [esp + 0x20]
call fcn.004155b0
test eax, eax
jne 0x5703f8
lea ecx, [ebx + 0xadc]
call fcn.0056b5c0
test esi, esi
jle 0x57045d
push 0
push esi
push edi
push ebp
mov byte [esp + 0x22], 1
call dword [sym.imp.ws2_32.dll_recv]
test eax, eax
mov dword [esp + 0x1c], eax
jle 0x570464
mov byte [esp + 0x16], 0
jmp 0x570464
cmp byte [esp + 0x12], 0
je 0x57047b
cmp byte [esp + 0x13], 0
jne 0x57047b
push ebp
lea ecx, [ebx + 0xaac]
call fcn.0056ae50
mov byte [esp + 0x13], al
lea ecx, [ebx + 0xadc]
call fcn.0056b560
mov edi, eax
mov ecx, edi
call fcn.004d3080
mov esi, eax
test esi, esi
je 0x570537
lea esp, [esp]
mov eax, dword [esi + 0x20]
cmp eax, 0xffffffff
je 0x5704b6
cmp ebp, 0xffffffff
je 0x5704b6
cmp eax, ebp
sete al
test al, al
jne 0x5704c5
mov ecx, edi
call fcn.004155b0
mov esi, eax
test esi, esi
jne 0x5704a0
jmp 0x570537
cmp byte [esp + 0x12], 0
je 0x5704ea
cmp dword [esp + 0x1c], 0
jle 0x5704ea
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x24]
push edx
push eax
lea ecx, [esi + 0x36]
call fcn.0056b3d0
mov byte [esp + 0x16], 1
movzx edi, word [esi + 0x4038]
cmp edi, 2
jl 0x570537
push 2
lea ecx, [esp + 0x170]
lea ebp, [esi + 0x36]
push ecx
mov ecx, ebp
call fcn.0056b4b0
test al, al
je 0x570537
mov esi, dword [esp + 0x16c]
and esi, 0x7ff
add esi, 2
cmp edi, esi
jl 0x570537
mov edx, dword [esp + 0x24]
push esi
push edx
mov ecx, ebp
call fcn.0056b440
test al, al
je 0x570537
mov dword [esp + 0x18], esi
lea ecx, [ebx + 0xadc]
call fcn.0056b5c0
cmp byte [esp + 0x16], 0
je 0x5706b0
mov edi, dword [esp + 0x18]
test edi, edi
jle 0x5706b0
cmp edi, 0x602
ja 0x5706b5
mov eax, dword [esp + 0x24]
push edi
push eax
lea ecx, [esp + 0x174]
push ecx
call fcn.0058d090
mov edx, dword [esp + 0x178]
and edx, 0x7ff
add edx, 2
add esp, 0xc
cmp edi, edx
jne 0x5706b5
mov ecx, ebx
mov byte [esp + 0x17], 1
call fcn.00571490
fstp dword [esp + 0x20]
lea eax, [esp + 0x28]
push eax
lea ecx, [ebx + 0xaac]
call fcn.0056aea0
lea edi, [ebx + 0xadc]
mov ecx, edi
call fcn.0056b560
mov esi, eax
mov ecx, esi
call fcn.004d3080
test eax, eax
je 0x570603
lea ecx, [ecx]
mov ecx, dword [esp + 0x2c]
cmp dword [eax + 4], ecx
mov dx, word [esp + 0x2a]
jne 0x5705e4
cmp word [eax + 2], dx
je 0x5705fc
cmp dword [eax + 0x14], ecx
jne 0x5705ef
cmp word [eax + 0x12], dx
je 0x5705fc
mov ecx, esi
call fcn.004155b0
test eax, eax
jne 0x5705d0
jmp 0x570603
fld dword [esp + 0x20]
fstp dword [eax + 0x2c]
mov ecx, edi
call fcn.0056b5c0
lea ebp, [ebx + 0xafc]
mov ecx, ebp
mov dword [esp + 0x18], 0xffffffff
call fcn.0056b560
mov edi, eax
mov ecx, edi
call fcn.004d3080
mov esi, eax
test esi, esi
je 0x570656
mov edi, edi
lea ecx, [esp + 0x28]
push ecx
mov ecx, esi
call fcn.0056ada0
test al, al
jne 0x57064f
mov ecx, edi
call fcn.004155b0
mov esi, eax
test esi, esi
jne 0x570630
jmp 0x570656
mov edx, dword [esi + 0x14]
mov dword [esp + 0x18], edx
mov ecx, ebp
call fcn.0056b5c0
mov eax, dword [ebx]
mov edx, dword [eax + 0x58]
mov ecx, ebx
call edx
mov esi, eax
test esi, esi
je 0x5706b5
push esi
lea eax, [esp + 0x170]
push eax
mov ecx, ebx
call fcn.0056afc0
cmp byte [esp + 0x77c], 0
mov ecx, dword [esp + 0x18]
mov dword [esi + 0x14], ecx
jne 0x5706a6
mov eax, dword [esi + 4]
cmp eax, 0xd
je 0x57069a
cmp eax, 0xe
jne 0x5706a6
mov edx, dword [ebx]
mov eax, dword [edx + 0x5c]
push esi
mov ecx, ebx
call eax
jmp 0x5706b5
push esi
mov ecx, ebx
call fcn.00573160
jmp 0x5706b5
mov byte [esp + 0x11], 1
cmp byte [esp + 0x12], 0
je case.0x570757.10015
mov eax, dword [esp + 0x1c]
cmp eax, 0xffffffff
je 0x570740
test eax, eax
jne case.0x570757.10015
push eax
mov word [esp + 0x54], 2
call dword [sym.imp.ws2_32.dll_htonl]
push 0
mov dword [esp + 0x58], eax
call dword [sym.imp.ws2_32.dll_htons_1]
lea ecx, [esp + 0x50]
push ecx
lea ecx, [ebx + 0xaac]
mov word [esp + 0x56], ax
call fcn.0056aea0
mov edx, dword [esp + 0x50]
mov ecx, dword [esp + 0x54]
push str.Closed_Gracefully
sub esp, 0x10
mov eax, esp
mov dword [eax], edx
mov edx, dword [esp + 0x6c]
mov dword [eax + 4], ecx
mov ecx, dword [esp + 0x70]
mov dword [eax + 8], edx
mov dword [eax + 0xc], ecx
mov ecx, ebx
call fcn.0056ea30
mov byte [esp + 0x14], 1
cmp byte [esp + 0x11], 0
jne 0x5707ca
mov ebp, dword [esp + 0x774]
jmp 0x5702e0
call dword [sym.imp.ws2_32.dll_WSAGetLastError]
add eax, 0xffffd8e2
cmp eax, 0x4f
ja case.0x570757.10015
movzx edx, byte [eax + 0x5708b4]
jmp dword [edx*4 + 0x57087c]
cmp byte [esp + 0x778], 0
jne case.0x570757.10015
mov esi, str.TCP_connection_reset
push 0
mov word [esp + 0x44], 2
call dword [sym.imp.ws2_32.dll_htonl]
push 0
mov dword [esp + 0x48], eax
call dword [sym.imp.ws2_32.dll_htons_1]
mov word [esp + 0x42], ax
lea eax, [esp + 0x40]
push eax
lea ecx, [ebx + 0xaac]
call fcn.0056aea0
mov ecx, dword [esp + 0x40]
mov edx, dword [esp + 0x44]
push esi
sub esp, 0x10
mov eax, esp
mov dword [eax], ecx
mov ecx, dword [esp + 0x5c]
mov dword [eax + 4], edx
mov edx, dword [esp + 0x60]
mov dword [eax + 8], ecx
mov ecx, ebx
mov dword [eax + 0xc], edx
call fcn.0056ea30
mov byte [esp + 0x14], 1
mov eax, dword [esp + 0x38]
add eax, 1
cmp eax, 1
mov dword [esp + 0x38], eax
jl 0x5701e0
mov al, byte [esp + 0x17]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x760
ret 0xc
push 0x200
lea ecx, [ebx + 0xaa0]
call fcn.0056a5a0
mov ebp, dword [esp + 0x774]
jmp 0x5702db
mov esi, str.Not_Initialised
jmp 0x57076d
mov esi, str.Network_Down
jmp 0x57076d
mov esi, str.Fault
jmp 0x57076d
mov esi, str.Not_Connected
jmp 0x57076d
mov esi, str.Network_Reset
jmp 0x57076d
mov esi, str.Not_Socket
jmp 0x57076d
mov esi, str.Not_Supported
jmp 0x57076d
mov esi, str.Shutdown
jmp 0x57076d
mov esi, str.Invalid
jmp 0x57076d
mov esi, str.Aborted
jmp 0x57076d
mov esi, str.Timed_Out
jmp 0x57076d