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

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
xor eax, eax
jne 0x40fac6
mov ecx, dword [ebp + 8]
cmp dword [ecx + 0x7d58], 7
jne 0x40fad8
jmp 0x40faef
push 0xac
push 0x4b7a38
push str.STATE_READ_LINE__pb__sock_state
call fcn.0040f4e0
add esp, 0xc
xor edx, edx
jne 0x40fac6
mov eax, dword [ebp + 8]
movzx ecx, word [eax + 0x7d4c]
test ecx, ecx
jne 0x40fc0a
xor edx, edx
jne 0x40fb05
mov eax, dword [ebp + 8]
movzx ecx, word [eax + 0x7d54]
mov edx, dword [ebp + 8]
add ecx, dword [edx + 0x7d50]
mov eax, dword [ebp + 8]
add eax, 0x7d28
cmp ecx, eax
jne 0x40fb2a
jmp 0x40fb41
push 0xb0
push 0x4b7a7c
push str._char_pb__ptr__pb__left__pb__core.http_buf__32000
call fcn.0040f4e0
add esp, 0xc
xor ecx, ecx
jne 0x40fb05
push 0
mov edx, dword [ebp + 8]
movzx eax, word [edx + 0x7d54]
push eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x7d50]
push edx
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x7d68]
push ecx
call dword [sym.imp.WS2_32.dll_recv]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
jg 0x40fb8a
mov edx, dword [ebp + 8]
push edx
mov eax, dword [ebp - 8]
push eax
call fcn.00410490
add esp, 8
jmp 0x40fd0f
xor ecx, ecx
jne 0x40fb8a
mov edx, dword [ebp + 8]
movzx eax, word [edx + 0x7d54]
cmp dword [ebp - 8], eax
jg 0x40fb9f
jmp 0x40fbb6
push 0xb5
push 0x4b7ad4
push str.recvres___pb__left
call fcn.0040f4e0
add esp, 0xc
xor ecx, ecx
jne 0x40fb8a
xor edx, edx
je 0x40fbe1
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x7d50]
push ecx
mov edx, dword [ebp - 8]
push edx
mov eax, dword [ebp - 8]
push eax
mov ecx, dword [ebp + 8]
push ecx
push str.pb_p_have_new_data_of_length_d:__.s_n
call fcn.0040e5a0
add esp, 0x14
xor edx, edx
jne 0x40fbba
mov eax, dword [ebp + 8]
mov cx, word [ebp - 8]
mov word [eax + 0x7d4c], cx
mov edx, dword [ebp + 8]
movzx eax, word [edx + 0x7d54]
sub eax, dword [ebp - 8]
mov ecx, dword [ebp + 8]
mov word [ecx + 0x7d54], ax
mov edx, dword [ebp + 8]
movzx eax, word [edx + 0x7d4c]
test eax, eax
jle 0x40fcca
mov ecx, dword [ebp + 8]
mov dx, word [ecx + 0x7d4c]
sub dx, 1
mov eax, dword [ebp + 8]
mov word [eax + 0x7d4c], dx
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x7d50]
mov al, byte [edx]
mov byte [ebp - 1], al
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x7d50]
add edx, 1
mov eax, dword [ebp + 8]
mov dword [eax + 0x7d50], edx
movzx ecx, byte [ebp - 1]
cmp ecx, 0xa
jne 0x40fcc5
xor edx, edx
je 0x40fc82
mov eax, dword [ebp + 8]
push eax
call fcn.0040fd20
add esp, 4
push eax
mov ecx, dword [ebp + 8]
push ecx
push str.pb_p__newline_found__line_length:__d_
call fcn.0040e5a0
add esp, 0xc
xor edx, edx
jne 0x40fc60
xor eax, eax
je 0x40fcac
mov ecx, dword [ebp + 8]
movzx edx, word [ecx + 0x7d4c]
push edx
push str.pbpal_line_read_status
push 0xc3
push 0x4b7b70
call fcn.0040e5a0
add esp, 0x10
xor eax, eax
jne 0x40fc86
xor ecx, ecx
jne 0x40fc86
mov edx, dword [ebp + 8]
mov dword [edx + 0x7d58], 0
xor eax, eax
jmp 0x40fd0f
jmp 0x40fc0a
mov eax, dword [ebp + 8]
movzx ecx, word [eax + 0x7d54]
test ecx, ecx
jne 0x40fd0a
mov edx, 1
test edx, edx
je 0x40fcf2
mov eax, dword [ebp + 8]
push eax
push str.pbpal_line_read_status_pb_p_:_buffer_full_but_newline_not_found
call fcn.0040e5a0
add esp, 8
xor ecx, ecx
jne 0x40fcd8
mov edx, dword [ebp + 8]
mov dword [edx + 0x7d58], 0
mov eax, 0xd
jmp 0x40fd0f
mov eax, 0xb
mov esp, ebp
pop ebp
ret