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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x134
mov eax, dword [0x40706c]
xor eax, esp
mov dword [esp + 0x130], eax
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x14]
push ebx
push esi
push edi
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], ecx
mov byte [eax], 0
xor esi, esi
mov edi, 9
mov ebx, dword [ebp + 8]
push 0
push edi
lea edx, [esp + esi + 0x120]
push edx
push ebx
call sub.nutsock4.dll_recv
add esp, 0x10
test eax, eax
jle 0x402fe0
add esi, eax
sub edi, eax
jne 0x402e35
mov al, byte [esp + 0x120]
cmp al, 0x32
mov edi, dword [ebp + 0x10]
mov bl, al
ja 0x403133
movzx esi, al
lea eax, [esi*8]
cmp eax, edi
mov dword [esp + 0x14], esi
jg 0x403133
mov ebx, dword [esp + 0xc]
mov edi, dword [sym.imp.numerical.dll_uts_trimSetCharacter]
lea ecx, [esp + 0x98]
push ecx
push ebx
call edi
lea edx, [esp + 0x20]
push edx
add ebx, 8
push ebx
call edi
add esp, 0x10
xor ebx, ebx
test esi, esi
jle 0x402f6e
mov eax, dword [esp + 0x10]
mov dword [esp + 0xc], eax
mov ecx, dword [esp + 0x118]
mov edx, dword [esp + 0x11c]
mov edi, dword [sym.imp.numerical.dll_uts_trimStringWide]
push 0
lea eax, [esp + 0x1c]
mov dword [esp + 0x128], ecx
push eax
lea ecx, [esp + 0x134]
mov dword [esp + 0x130], edx
push ecx
lea edx, [esp + 0x130]
push edx
call edi
push 0
lea eax, [esp + 0xac]
push eax
lea ecx, [esp + 0x14c]
push ecx
lea edx, [esp + 0x148]
push edx
call edi
mov ecx, dword [esp + 0x2c]
push 8
lea eax, [esp + 0x158]
push eax
push ecx
call sub.nutlibc4.dll_strncpy
lea eax, [esi - 1]
add esp, 0x2c
cmp ebx, eax
jge 0x402f5e
xor esi, esi
mov edi, 9
mov eax, dword [ebp + 8]
push 0
push edi
lea edx, [esp + esi + 0x120]
push edx
push eax
call sub.nutsock4.dll_recv
add esp, 0x10
test eax, eax
jle 0x403088
add esi, eax
sub edi, eax
jne 0x402f35
mov esi, dword [esp + 0x14]
add dword [esp + 0xc], 8
add ebx, 1
cmp ebx, esi
jl 0x402eb9
cmp dword [0x408a78], 0
je 0x402fb6
call sub.nutlibc4.dll_getpid
mov edx, dword [0x408a78]
push eax
push str._d:
push edx
call sub.nutlibc4.dll_fprintf
mov eax, dword [esp + 0x1c]
mov ecx, dword [ebp + 8]
mov edx, dword [0x408a78]
push eax
push ecx
push str.Received_from__d:__s_n
push edx
call sub.nutlibc4.dll_fprintf
mov eax, dword [0x408a78]
push eax
call sub.nutlibc4.dll_fflush
add esp, 0x20
mov eax, dword [esp + 0x10]
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x402fc0
sub eax, edx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x130]
xor ecx, esp
call fcn.00403990
mov esp, ebp
pop ebp
ret
test eax, eax
mov dword [0x408b00], ebx
jne 0x40303a
call sub.nutlibc4.dll_getpid
push eax
mov eax, dword [0x408a78]
push str._d:
push eax
call sub.nutlibc4.dll_fprintf
mov ecx, dword [0x408a78]
push str.Socket_connection_closed_by_the_other_side_n
push ecx
call sub.nutlibc4.dll_fprintf
mov edx, dword [0x408a78]
push edx
call sub.nutlibc4.dll_fflush
add esp, 0x18
mov eax, 0xfffffffe
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x130]
xor ecx, esp
call fcn.00403990
mov esp, ebp
pop ebp
ret
call sub.nutlibc4.dll_getpid
push eax
mov eax, dword [0x408a78]
push str._d:
push eax
call sub.nutlibc4.dll_fprintf
mov ecx, dword [0x408a78]
push str.Error:_Socket_read_error_n
push ecx
call sub.nutlibc4.dll_fprintf
mov edx, dword [0x408a78]
push edx
call sub.nutlibc4.dll_fflush
add esp, 0x18
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x130]
xor ecx, esp
call fcn.00403990
mov esp, ebp
pop ebp
ret
test eax, eax
mov ecx, dword [ebp + 8]
mov dword [0x408b00], ecx
jne 0x4030e5
call sub.nutlibc4.dll_getpid
mov edx, dword [0x408a78]
push eax
push str._d:
push edx
call sub.nutlibc4.dll_fprintf
mov eax, dword [0x408a78]
push str.Socket_connection_closed_by_the_other_side_n
push eax
call sub.nutlibc4.dll_fprintf
mov ecx, dword [0x408a78]
push ecx
call sub.nutlibc4.dll_fflush
add esp, 0x18
mov eax, 0xfffffffe
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x130]
xor ecx, esp
call fcn.00403990
mov esp, ebp
pop ebp
ret
call sub.nutlibc4.dll_getpid
mov edx, dword [0x408a78]
push eax
push str._d:
push edx
call sub.nutlibc4.dll_fprintf
mov eax, dword [0x408a78]
push str.Error:_Socket_read_error_n
push eax
call sub.nutlibc4.dll_fprintf
mov ecx, dword [0x408a78]
push ecx
call sub.nutlibc4.dll_fflush
add esp, 0x18
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x130]
xor ecx, esp
call fcn.00403990
mov esp, ebp
pop ebp
ret
call sub.nutlibc4.dll_getpid
mov ecx, dword [0x408a78]
push eax
push str._d:
push ecx
call sub.nutlibc4.dll_fprintf
mov eax, dword [0x408a78]
movzx edx, bl
push edi
push edx
push str.RcvMsg:_count___d__BufSize___d_n
push eax
call sub.nutlibc4.dll_fprintf
mov ecx, dword [0x408a78]
push ecx
call sub.nutlibc4.dll_fflush
push 0x24
call fcn.004021e0
mov ecx, dword [esp + 0x160]
add esp, 0x24
pop edi
pop esi
pop ebx
xor ecx, esp
or eax, 0xffffffff
call fcn.00403990
mov esp, ebp
pop ebp
ret