Function at 0x1005d540
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov dword [ebp - 8], ecx
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x14], 0
push 0
mov eax, dword [ebp - 8]
mov ecx, 0x2000
sub ecx, dword [eax + 0x200c]
push ecx
mov edx, dword [ebp - 8]
mov eax, dword [edx + 0x200c]
mov ecx, dword [ebp - 8]
lea edx, [ecx + eax + 0xc]
push edx
mov eax, dword [ebp - 8]
mov ecx, dword [eax + 4]
push ecx
call dword [sym.imp.WS2_32.dll_recv]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0xffffffff
jne 0x1005d5bb
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x1005d5ac
mov al, 1
jmp 0x1005d78d
mov ecx, dword [ebp - 8]
call fcn.1005d480
xor al, al
jmp 0x1005d78d
mov edx, dword [ebp - 8]
mov eax, dword [edx + 0x200c]
add eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 8]
mov dword [ecx + 0x200c], eax
mov edx, dword [ebp - 8]
cmp dword [edx + 0x200c], 4
jge 0x1005d5e3
mov al, 1
jmp 0x1005d78d
mov eax, 1
test eax, eax
je 0x1005d78b
mov ecx, dword [ebp - 8]
add ecx, dword [ebp - 0xc]
movzx edx, byte [ecx + 0xc]
cmp edx, 0xc1
jne 0x1005d629
mov eax, dword [ebp - 8]
add eax, dword [ebp - 0xc]
mov cl, byte [eax + 0xc]
mov byte [ebp - 2], cl
mov edx, dword [ebp - 8]
add edx, dword [ebp - 0xc]
movzx eax, byte [edx + 0xd]
mov dword [ebp - 0x10], eax
mov ecx, dword [ebp - 8]
add ecx, dword [ebp - 0xc]
mov dl, byte [ecx + 0xf]
mov byte [ebp - 1], dl
jmp 0x1005d695
mov eax, dword [ebp - 8]
add eax, dword [ebp - 0xc]
movzx ecx, byte [eax + 0xc]
cmp ecx, 0xc2
jne 0x1005d686
mov edx, dword [ebp - 8]
add edx, dword [ebp - 0xc]
mov al, byte [edx + 0xc]
mov byte [ebp - 2], al
mov ecx, dword [ebp - 8]
add ecx, dword [ebp - 0xc]
movzx edx, byte [ecx + 0xe]
and edx, 0xff
movzx eax, dl
mov ecx, dword [ebp - 8]
add ecx, dword [ebp - 0xc]
movzx edx, byte [ecx + 0xd]
and edx, 0xff
movzx ecx, dl
shl ecx, 8
or eax, ecx
movzx edx, ax
mov dword [ebp - 0x10], edx
mov eax, dword [ebp - 8]
add eax, dword [ebp - 0xc]
mov cl, byte [eax + 0x10]
mov byte [ebp - 1], cl
jmp 0x1005d695
mov ecx, dword [ebp - 8]
call fcn.1005d480
xor al, al
jmp 0x1005d78d
cmp dword [ebp - 0x10], 4
jl 0x1005d6a4
cmp dword [ebp - 0x10], 0x2000
jle 0x1005d6b3
mov ecx, dword [ebp - 8]
call fcn.1005d480
xor al, al
jmp 0x1005d78d
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0x10]
cmp eax, dword [edx + 0x200c]
jg 0x1005d73b
movzx ecx, byte [ebp - 2]
cmp ecx, 0xc1
jne 0x1005d6db
mov edx, dword [ebp - 8]
add edx, dword [ebp - 0xc]
mov al, byte [edx + 0xf]
mov byte [ebp - 1], al
jmp 0x1005d6e7
mov ecx, dword [ebp - 8]
add ecx, dword [ebp - 0xc]
mov dl, byte [ecx + 0x10]
mov byte [ebp - 1], dl
mov eax, dword [ebp - 8]
mov ecx, dword [eax + 0x4014]
mov dword [ebp - 0x18], ecx
mov edx, dword [ebp - 0x10]
push edx
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 8]
lea edx, [ecx + eax + 0xc]
push edx
movzx eax, byte [ebp - 1]
push eax
call dword [ebp - 0x18]
add esp, 0xc
mov ecx, dword [ebp - 0xc]
add ecx, dword [ebp - 0x10]
mov dword [ebp - 0xc], ecx
mov edx, dword [ebp - 8]
mov eax, dword [edx + 0x200c]
sub eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 8]
mov dword [ecx + 0x200c], eax
mov edx, dword [ebp - 8]
cmp dword [edx + 0x200c], 0
jg 0x1005d739
jmp 0x1005d78b
jmp 0x1005d786
cmp dword [ebp - 0xc], 0
jle 0x1005d784
mov eax, dword [ebp - 8]
cmp dword [eax + 0x200c], 0
jle 0x1005d784
mov ecx, 0x2000
sub ecx, dword [ebp - 0xc]
mov edx, dword [ebp - 8]
cmp dword [edx + 0x200c], ecx
jg 0x1005d784
mov eax, dword [ebp - 8]
mov ecx, dword [eax + 0x200c]
push ecx
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 8]
lea ecx, [eax + edx + 0xc]
push ecx
mov edx, dword [ebp - 8]
add edx, 0xc
push edx
call fcn.1019a4c0
add esp, 0xc
jmp 0x1005d78b
jmp 0x1005d5e3
mov al, 1
mov esp, ebp
pop ebp
ret