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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x250
push ebx
push esi
push edi
push 0
mov ebx, 0x208
push ebx
lea eax, [ebp - 0x210]
push eax
push dword [ebp + 8]
call sub.WSOCK32.dll_recv
mov edi, eax
cmp edi, 0xffffffff
je 0x46dd89
test edi, edi
jne 0x46ddfa
xor esi, esi
cmp dword [ebp + 0x10], esi
je 0x46ddd4
push esi
push 0x100
lea eax, [ebp - 4]
push eax
mov dword [ebp - 4], esi
call dword [sym.imp.KERNEL32.dll_GetSystemDefaultLangID]
movzx eax, ax
push eax
call sub.WSOCK32.dll_WSAGetLastError
push eax
push esi
push 0x1100
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
cmp dword [ebp - 4], esi
je 0x46ddd4
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push dword [ebp - 4]
push esi
call dword [ebp + 0x10]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_LocalFree]
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
push 0
mov eax, ebx
sub eax, edi
push eax
push esi
push dword [ebp + 8]
call sub.WSOCK32.dll_recv
cmp eax, 0xffffffff
je 0x46dd89
test eax, eax
je 0x46dd89
add edi, eax
cmp edi, ebx
jae 0x46ddd4
lea eax, [ebp - 0x210]
push 0x5054d0
lea esi, [ebp + edi - 0x210]
and byte [esi], 0
push eax
call fcn.004b3a50
test eax, eax
pop ecx
pop ecx
je 0x46dddb
lea eax, [ebp - 0x210]
push eax
call fcn.0046db7b
test eax, eax
pop ecx
jne 0x46de45
cmp dword [ebp + 0x10], eax
je 0x46ddd4
push dword [ebp + 0x18]
lea eax, [ebp - 0x210]
push dword [ebp + 0x14]
push eax
push 1
call dword [ebp + 0x10]
jmp 0x46ddd4
lea eax, [ebp - 0x210]
push 0x5054d0
push eax
call fcn.004b3a50
mov esi, eax
lea eax, [ebp - 0x210]
push str._r_n._r_n
inc esi
push eax
inc esi
call fcn.004b3a50
mov ebx, eax
add esp, 0x10
test ebx, ebx
je 0x46de78
and byte [ebx + 2], 0
push esi
call fcn.004af4f0
push dword [ebp + 0xc]
mov edi, eax
push edi
push 1
push esi
call fcn.004b268e
add esp, 0x14
test ebx, ebx
jne 0x46dfc5
push edi
lea eax, [ebp - 0x210]
push esi
push eax
call fcn.004af7d0
add esp, 0xc
push 4
pop esi
cmp edi, esi
jg 0x46deb1
mov esi, edi
and dword [ebp - 4], 0
sub edi, esi
push esi
lea eax, [ebp + edi - 0x210]
push eax
lea eax, [ebp - 0x210]
push eax
call fcn.004af7d0
add esp, 0xc
push 0
jmp 0x46df90
test ebx, ebx
je 0x46dd89
lea eax, [ebp - 0x210]
push str._r_n._r_n
lea edi, [esi + ebx]
and byte [ebp + edi - 0x210], 0
push eax
call fcn.004b3a50
test eax, eax
pop ecx
pop ecx
mov dword [ebp - 8], eax
je 0x46df09
and byte [eax + 2], 0
jmp 0x46df16
push 4
pop eax
cmp ebx, eax
mov dword [ebp - 4], eax
jg 0x46df16
mov dword [ebp - 4], ebx
push dword [ebp + 0xc]
mov esi, dword [ebp - 4]
mov eax, edi
sub eax, esi
push eax
lea eax, [ebp - 0x210]
push 1
push eax
call fcn.004b268e
xor ebx, ebx
add esp, 0x10
cmp dword [ebp - 8], ebx
jne 0x46dfc5
cmp dword [ebp + 0x10], ebx
je 0x46df72
push dword [ebp + 0xc]
call fcn.004b2d1c
push 0xa
lea ecx, [ebp - 0x250]
push ecx
push eax
call fcn.004b1696
add esp, 0x10
push dword [ebp + 0x18]
lea eax, [ebp - 0x250]
push dword [ebp + 0x14]
push eax
push 3
call dword [ebp + 0x10]
test eax, eax
je 0x46dfb8
sub edi, esi
push esi
lea eax, [ebp + edi - 0x210]
push eax
lea eax, [ebp - 0x210]
push eax
mov dword [ebp - 4], ebx
call fcn.004af7d0
add esp, 0xc
push ebx
mov eax, 0x200
sub eax, esi
push eax
lea eax, [ebp + esi - 0x210]
push eax
push dword [ebp + 8]
call sub.WSOCK32.dll_recv
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x46ded6
jmp 0x46dd89
push dword [ebp + 8]
call sub.WSOCK32.dll_closesocket
jmp 0x46ddd4
xor eax, eax
inc eax
jmp 0x46ddd6