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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x748638
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push ebx
push esi
push edi
mov eax, dword [0x899944]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
cmp dword [ebp + 8], 0
je 0x5183c3
mov edx, dword [ebp + 0xc]
mov ecx, dword [edx]
mov al, 1
test ecx, ecx
je 0x5183c5
mov edi, dword [ebp + 0x1c]
mov dword [edx], 0
mov dl, byte [ebp + 0x10]
mov dword [ebp - 0x10], ecx
cmp dword [ebp - 0x10], 0
je 0x5183c5
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x14], eax
mov byte [ebp + 0x10], dl
cmp eax, 0xabcd0123
jne 0x5180e7
mov byte [ebp + 0x10], 1
mov dword [ebp - 0x14], 1
cmp dword [ebp + 8], 0
je 0x5183c3
mov esi, dword [ebp + 0x18]
mov ecx, esi
call fcn.004a71c0
cmp dword [ebx + 0xb4], 0xffffffff
je 0x518288
cmp byte [ebx + 0x11], 0
lea eax, [ebx + 0x11]
jne 0x5182a8
cmp byte [ebx + 0x12], 0
jne 0x5182bb
push eax
lea ecx, [ebp - 0x20]
call fcn.0046e4a0
cmp dword [ebp - 0x14], 0
mov eax, dword [ebp - 0x10]
mov dword [ebp - 4], 0
mov dword [ebp - 0x18], eax
jne 0x518142
mov dword [ebp - 0x14], 0xc042c00
mov edx, dword [esi + 4]
push edi
push edx
lea ecx, [ebx + 0x150]
push 0x1000
call fcn.00566620
test al, al
jne 0x5182cf
cmp byte [ebx + 0x12], al
jne 0x5182e6
or esi, 0xffffffff
cmp dword [ebx + 0xb4], esi
je 0x5182fb
mov eax, 0x100000
cmp dword [ebp - 0x10], eax
jbe 0x518184
mov dword [ebp - 0x18], eax
mov byte [ebp + 0x1f], 1
jmp 0x518190
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp + 8]
mov edx, dword [ebx + 0xb4]
push 0
push eax
push ecx
push edx
call dword [sym.imp.WS2_32.dll_recv]
mov esi, eax
test esi, esi
jg 0x51820e
je 0x518311
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x518349
cmp byte [ebp + 0x1f], 0
je 0x5183ad
cmp byte [ebp + 0x10], 0
jne 0x5183ad
mov ecx, dword [ebp + 0x18]
push edi
call fcn.004a71f0
test al, al
jne 0x5183b4
mov eax, dword [ebp + 0x18]
mov ecx, dword [ebp - 0x14]
push edi
push eax
push ecx
mov ecx, ebx
call fcn.00513e90
test al, al
je 0x51837e
mov byte [ebp + 0x1f], 0
test esi, esi
js 0x518190
jmp 0x5183b4
lea edx, [esi - 0x1000]
push edx
lea ecx, [ebx + 0x150]
call fcn.00566820
cmp byte [ebx + 0x278], 0
je 0x51823a
mov eax, dword [ebp + 0x18]
mov ecx, dword [eax + 4]
push edi
push ecx
push esi
lea ecx, [ebx + 0x20]
call fcn.004a6c80
cmp byte [ebx + 0x275], 0
je 0x518258
mov edx, dword [ebp + 0x18]
mov ecx, dword [edx + 4]
test ecx, ecx
je 0x518258
mov eax, esi
cdq
push edi
push edx
push eax
call fcn.00488110
lea ecx, [ebp - 0x20]
mov dword [ebp - 4], 0xffffffff
call fcn.0046e4c0
mov ecx, dword [ebp + 0x18]
cmp byte [ecx + 0x11], 0
mov al, 1
jne 0x5183c5
mov ecx, dword [ebp + 0xc]
add dword [ecx], esi
sub dword [ebp - 0x10], esi
xor dl, dl
add dword [ebp + 8], esi
jmp 0x5180c2
mov edx, dword [edi]
mov eax, dword [edx + 0x14]
push str.This_socket_is_not_connected
mov ecx, edi
call eax
mov byte [esi + 0x12], 1
mov word [ebx + 0xb0], 0
jmp 0x5183c3
mov edx, dword [edi]
mov eax, dword [edx + 0x14]
push str.Another_thread_is_already_receiving_on_this_socket.
mov ecx, edi
call eax
jmp 0x5183c3
mov edx, dword [edi]
mov eax, dword [str.Another_thread_is_closing_this_socket.]
mov edx, dword [edx + 0x14]
push eax
mov ecx, edi
call edx
jmp 0x5183c3
mov byte [esi + 0x11], 1
mov eax, dword [edi]
mov edx, dword [eax + 0x14]
push str.Aborted_by_application_while_download_throttling__2_
mov ecx, edi
call edx
jmp 0x5183b4
mov ecx, dword [str.Another_thread_is_closing_this_socket.]
mov eax, dword [edi]
mov edx, dword [eax + 0x14]
push ecx
mov ecx, edi
call edx
jmp 0x5183b4
mov eax, dword [edi]
mov edx, dword [eax + 0x14]
push str.The_socket_is_already_closed.__Cannot_recv.
mov ecx, edi
call edx
mov dword [ebp - 4], esi
jmp 0x5183bb
cmp byte [edi + 0xad], 0
je 0x518338
mov eax, dword [ebp - 0x18]
push eax
push str.maxToReceive
mov ecx, edi
call fcn.00474a80
mov edx, dword [edi]
mov eax, dword [edx + 0x14]
push str.Connection_closed_by_peer.
mov ecx, edi
call eax
push edi
mov ecx, ebx
call fcn.005151f0
mov ecx, dword [ebp + 0x18]
mov byte [ecx + 0x13], 1
jmp 0x5183b4
mov ecx, edi
call fcn.00474d10
mov edx, dword [ebp - 0x18]
push edx
push str.maxToReceive
mov ecx, edi
call fcn.00474a80
mov eax, dword [edi]
mov edx, dword [eax + 0x14]
push str.Failed_to_receive_data_on_the_TCP_socket
mov ecx, edi
call edx
mov eax, dword [ebp + 0x18]
mov byte [eax + 0x12], 1
mov byte [ebx + 0xb0], 0
jmp 0x5183b4
mov eax, dword [ebp + 0x18]
cmp byte [eax + 0x11], 0
je 0x518397
mov edx, dword [edi]
mov eax, dword [edx + 0x14]
push str.Socket_recv_aborted_by_application
mov ecx, edi
call eax
jmp 0x5183b4
cmp byte [eax + 0x10], 0
jne 0x5183b4
mov edx, dword [edi]
mov eax, dword [edx + 0x14]
push str.Socket_recv_failed.
mov ecx, edi
call eax
jmp 0x5183b4
mov ecx, dword [ebp + 0x18]
mov byte [ecx + 0x10], 1
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x20]
call fcn.0046e4c0
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x18