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

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x4c
mov esi, edx
mov dword [esp], ecx
mov ecx, dword [esp + 0x64]
xor eax, eax
add edx, 8
lea ebp, [esp + 0x2c]
cmp dword [esi + 8], 0xffffffff
mov edi, dword [ecx + 4]
cmove edx, eax
mov eax, dword [ecx + 8]
mov ecx, dword [ecx]
mov dword [esp + 0x14], edx
mov dword [esp + 0x10], edi
add ecx, eax
sub edi, eax
mov dword [esp + 4], eax
mov dword [esp + 0x24], ecx
mov ecx, 0x7fffffff
cmp edi, ecx
cmovae edi, ecx
mov dword [esp + 0x28], edi
mov edx, dword [esi + 4]
mov ecx, ebp
push 0
push dword [esp + 0x64]
call fcn.00511e1d
pop eax
pop ecx
mov edx, dword [esp + 0x2c]
cmp edx, 2
je 0x5121e6
mov ecx, dword [esp + 0x30]
mov eax, dword [esp + 0x34]
test edx, edx
jne 0x5121ee
mov edx, dword [esp + 0x10]
mov dword [esp + 0x44], ecx
mov dword [esp + 0x48], eax
cmp edx, dword [esp + 4]
jb 0x512233
mov edi, dword [esp + 0x14]
mov edx, 0x62ae58
mov ecx, edi
call fcn.00441e84
push 0
push dword [esp + 0x2c]
push dword [esp + 0x2c]
push dword [edi]
call dword [sym.imp.ws2_32.dll_recv]
cmp eax, 0xffffffff
jne 0x5120ff
call dword [sym.imp.ws2_32.dll_WSAGetLastError]
mov edi, eax
xor eax, eax
cmp edi, 0x274a
jne 0x512151
mov dword [esp + 0xc], eax
mov byte [esp + 8], 4
mov ebx, dword [esp + 8]
mov edi, dword [esp + 0xc]
cmp bl, 4
mov dword [esp + 0x1c], edi
mov dword [esp + 0x18], ebx
je 0x5121f8
lea ecx, [esp + 0x18]
call fcn.0050ee04
cmp al, 0xd
jne 0x512223
mov ecx, esi
lea edx, [esp + 0x44]
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], edi
call fcn.00511dd7
push ebp
call fcn.0040276f
pop eax
jmp 0x512081
lea ecx, [esp + 8]
mov byte [esp + 8], 0
mov dword [esp + 0xc], edi
call fcn.0042d298
cmp al, 0xd
jne 0x512108
mov eax, dword [esp + 0x14]
mov eax, dword [eax + 4]
test eax, eax
je 0x5121d4
mov dword [esp + 0x20], edi
mov edi, dword [eax + 4]
mov edx, dword [eax]
lock inc dword [edi]
jle 0x512245
add edx, 8
mov ecx, ebp
push dword [eax + 0xc]
push dword [eax + 8]
push edi
call fcn.0044b1e6
add esp, 0xc
push 4
pop ecx
call fcn.004fbab9
cmp byte [esp + 0x2c], 4
je 0x512108
mov ebx, dword [esp + 0x2c]
mov edx, dword [esp + 0x20]
cmp bl, 4
je 0x512108
mov edi, dword [esp + 0x30]
xor ecx, ecx
mov dword [esp + 0x18], ebx
mov dword [esp + 0x1c], edi
call fcn.004fbab9
jmp 0x512121
and dword [esp + 0x30], 0
mov dword [esp + 0x2c], 4
jmp 0x512108
mov eax, dword [esp]
mov byte [eax], 5
jmp 0x51222b
mov edx, dword [esp]
mov dword [edx], ecx
mov dword [edx + 4], eax
jmp 0x51222b
mov edx, dword [esp + 0x64]
mov eax, dword [esp + 4]
mov ecx, dword [edx + 0xc]
add eax, edi
cmp eax, ecx
jbe 0x51220e
mov ecx, eax
mov dword [edx + 0xc], eax
add dword [esp + 4], edi
jb 0x512247
cmp ecx, eax
jb 0x512259
mov ecx, dword [esp]
mov dword [edx + 8], eax
mov byte [ecx], 4
jmp 0x51222b
mov eax, dword [esp]
mov dword [eax], ebx
mov dword [eax + 4], edi
add esp, 0x4c
pop esi
pop edi
pop ebx
pop ebp
ret
mov ecx, dword [esp + 4]
mov edx, dword [esp + 0x10]
push 0x62ac10
call fcn.0059ee10
ud2
push 0xf
pop edx
mov ecx, str.filled_overflowfilled_must_not_become_larger_than_initialized
push 0x62ae68
call fcn.0059f240
lea ecx, [esp + 0x2c]
mov edx, 0x62ae68
mov dword [ecx], 0x62ac60
mov dword [ecx + 4], 1
and dword [ecx + 0x10], 0
mov dword [ecx + 8], str._rustc_07dca489ac2d933c78d3c5158e3f43beefeb02celibrarycore_src_sync_atomic.rsthere_is_no_such_thing_as_an_acquire_store
and dword [ecx + 0xc], 0
call fcn.0059ede0