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

Disassembly:
push ecx
mov eax, dword [esi + 4]
push ebp
push edi
mov edi, 4
cmp eax, edi
mov ebp, 3
je 0x420a36
cmp eax, ebp
je 0x420a36
cmp eax, 2
push ebx
jne 0x42087c
mov ecx, dword [esi]
push 0
push edi
lea eax, [esp + 0x14]
push eax
push ecx
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
je 0x4209a3
jl 0x4209af
push str.ERROR:_read_data_from_a_completed_request.
call fcn.00410870
add esp, 4
pop ebx
pop edi
mov eax, ebp
mov dword [esi + 4], ebp
pop ebp
pop ecx
ret
cmp eax, 1
je 0x420899
push eax
push str.ERROR:_read_msg_called_with_invalid_transfer_state___d_
call fcn.00410870
add esp, 8
pop ebx
pop edi
mov eax, ebp
mov dword [esi + 4], ebp
pop ebp
pop ecx
ret
mov eax, dword [esi + 8]
cmp eax, 0x1c
mov ebx, dword [sym.imp.WS2_32.dll_recv]
jae 0x420923
push 0
mov ecx, 0x1c
sub ecx, eax
push ecx
lea edx, [eax + esi + 0xc]
mov eax, dword [esi]
push edx
push eax
call ebx
test eax, eax
je 0x4209a3
jl 0x4209af
add dword [esi + 8], eax
cmp dword [esi + 8], 0x1c
jne 0x420904
lea edi, [esi + 0xc]
push edi
call fcn.004061d0
mov edi, dword [edi]
add esp, 4
cmp edi, 1
je 0x4208ff
push 1
push edi
push str.ERROR:_read_msg___client_version_0x_08X_does_not_match_daemon_version_0x_08X
call fcn.00410870
add esp, 0xc
pop ebx
pop edi
mov eax, ebp
mov dword [esi + 4], ebp
pop ebp
pop ecx
ret
mov edi, 4
mov eax, dword [esi + 8]
cmp eax, 0x1c
jbe 0x420923
push str.ERROR:_read_msg___read_too_many_header_bytes
call fcn.00410870
add esp, 4
pop ebx
pop edi
mov eax, ebp
mov dword [esi + 4], ebp
pop ebp
pop ecx
ret
jne 0x420a0a
mov eax, dword [esi + 0x10]
test eax, eax
jne 0x420944
pop ebx
mov eax, 2
pop edi
mov dword [esi + 4], eax
mov dword [esi + 0x2c], 0
pop ebp
pop ecx
ret
cmp dword [esi + 0x2c], 0
jne 0x420989
add eax, 5
push eax
call fcn.004236b5
add esp, 4
test eax, eax
mov dword [esi + 0x2c], eax
jne 0x420974
push str.ERROR:_malloc
call fcn.0041ff40
add esp, 4
pop ebx
pop edi
mov eax, ebp
mov dword [esi + 4], ebp
pop ebp
pop ecx
ret
mov ecx, dword [esi + 0x10]
add ecx, 5
push ecx
push 0
push eax
mov dword [esi + 0x30], eax
call fcn.00423780
add esp, 0xc
mov ecx, dword [esi + 0x28]
mov eax, dword [esi + 0x10]
mov edx, dword [esi + 0x2c]
push 0
sub eax, ecx
push eax
mov eax, dword [esi]
add edx, ecx
push edx
push eax
call ebx
test eax, eax
jne 0x4209ad
pop ebx
mov dword [esi + 4], edi
mov eax, edi
pop edi
pop ebp
pop ecx
ret
jge 0x4209e8
mov edi, dword [sym.imp.WS2_32.dll_WSAGetLastError]
call edi
cmp eax, 0x2733
je 0x4209de
call edi
cmp eax, 0x2714
je 0x4209de
push str.ERROR:_read_msg
call fcn.0041ff40
add esp, 4
pop ebx
pop edi
mov eax, ebp
mov dword [esi + 4], ebp
pop ebp
pop ecx
ret
pop ebx
pop edi
mov eax, 1
pop ebp
pop ecx
ret
add dword [esi + 0x28], eax
mov eax, dword [esi + 0x28]
cmp eax, dword [esi + 0x10]
jbe 0x420a0a
push str.ERROR:_read_msg___read_too_many_data_bytes
call fcn.00410870
add esp, 4
pop ebx
pop edi
mov eax, ebp
mov dword [esi + 4], ebp
pop ebp
pop ecx
ret
cmp dword [esi + 8], 0x1c
jne 0x420a27
mov ecx, dword [esi + 0x28]
cmp ecx, dword [esi + 0x10]
jne 0x420a27
pop ebx
pop edi
mov dword [esi + 4], 2
mov eax, dword [esi + 4]
pop ebp
pop ecx
ret
pop ebx
pop edi
mov dword [esi + 4], 1
mov eax, dword [esi + 4]
pop ebp
pop ecx
ret
push str.ERROR:_read_msg_called_with_transfer_state_terminated_or_error
call fcn.00410870
add esp, 4
pop edi
mov dword [esi + 4], ebp
mov eax, ebp
pop ebp
pop ecx
ret