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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x2030
call fcn.00571390
push ebx
push ebp
mov ebp, dword [0x5b1224]
push esi
xor esi, esi
cmp ebp, esi
push edi
je 0x51d02d
cmp dword [ebp + 0x190], ecx
je 0x51ccde
mov ebp, dword [ebp + 0x198]
cmp ebp, esi
jne 0x51ccc4
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [ebp + 0x14c], 2
jne 0x51d02d
mov eax, edx
shr eax, 0x10
cmp ax, si
je 0x51cd5b
mov edi, dword [ebp + 0x148]
movzx eax, ax
mov dword [ebp + 0x184], eax
cmp dword [0x5ae60c], esi
je 0x51cd54
cmp dx, 0x20
push 3
jne 0x51cd29
push 0x3b
mov ecx, str.SOCKCLOSE
mov edx, ebp
call fcn.0051b2f0
mov edx, edi
jmp 0x51d01b
cmp dword [ebp + 0x158], esi
je 0x51cd46
push 0x44
mov ecx, str.UDPREAD
mov edx, ebp
call fcn.0051b2f0
mov edx, edi
jmp 0x51d01b
push 0x3e
mov ecx, str.SOCKREAD
mov edx, ebp
call fcn.0051b2f0
mov edx, edi
jmp 0x51d01b
push esi
call fcn.00570bc6
mov edx, dword [ebp + 0x190]
add esp, 4
push 1
push 1
mov ecx, 0x8038
mov dword [ebp + 0x180], eax
call fcn.0054c250
test eax, eax
jne 0x51d02d
mov ecx, dword [ebp + 0x188]
inc ecx
mov eax, ecx
cmp eax, 0x14
mov dword [ebp + 0x188], ecx
jl 0x51cdbb
mov edx, dword [ebp + 0x190]
push esi
push 1
mov ecx, 0x8038
mov dword [ebp + 0x188], esi
call fcn.0054c250
test eax, eax
jne 0x51d02d
mov edx, dword [ebp + 0x138]
mov eax, 0x1001
sub eax, edx
cmp eax, 1
jle 0x51cf10
mov ecx, dword [ebp + 0x158]
dec eax
cmp ecx, esi
je 0x51ce32
lea ecx, [esp + 0x14]
push ecx
mov ecx, dword [ebp + 0x190]
lea edx, [esp + 0x1c]
push edx
push esi
push eax
lea eax, [esp + 0x1048]
push eax
push ecx
mov dword [esp + 0x2c], 0x10
call dword [sym.imp.WSOCK32.dll_recvfrom]
mov ebx, eax
cmp dword [esp + 0x14], esi
jle 0x51ce4b
mov edx, dword [esp + 0x1c]
push edx
call dword [sym.imp.WSOCK32.dll_htonl]
mov dword [ebp + 0x168], eax
mov eax, dword [esp + 0x1a]
push eax
call dword [sym.imp.WSOCK32.dll_ntohs]
mov word [ebp + 0x16c], ax
jmp 0x51ce4b
mov edx, dword [ebp + 0x190]
push esi
push eax
lea ecx, [esp + 0x1040]
push ecx
push edx
call dword [sym.imp.WSOCK32.dll_recv]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x51cfce
cmp ebx, esi
jle 0x51cfe8
cmp dword [0x5ae60c], esi
jne 0x51ce88
mov eax, dword [ebp + 0x134]
cmp eax, esi
je 0x51ce77
push eax
call fcn.005700aa
add esp, 4
mov dword [ebp + 0x134], esi
mov dword [ebp + 0x138], esi
jmp 0x51cd86
mov eax, dword [ebp + 0x134]
cmp eax, esi
je 0x51ceb6
mov ecx, dword [ebp + 0x138]
lea edx, [ecx + ebx + 0xa]
push edx
push eax
call fcn.00571c26
add esp, 8
cmp eax, esi
je 0x51cd86
mov dword [ebp + 0x134], eax
jmp 0x51ced0
lea eax, [ebx + 0xa]
push eax
call fcn.00570098
add esp, 4
cmp eax, esi
mov dword [ebp + 0x134], eax
je 0x51cd86
mov edi, dword [ebp + 0x138]
add edi, dword [ebp + 0x134]
mov ecx, ebx
mov edx, ecx
shr ecx, 2
lea esi, [esp + 0x1038]
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebp + 0x138]
mov ecx, dword [ebp + 0x134]
add eax, ebx
mov dword [ebp + 0x138], eax
mov byte [eax + ecx], 0
xor esi, esi
lea ecx, [ecx]
cmp dword [ebp + 0x158], esi
mov ebx, dword [ebp + 0x148]
mov dword [ebp + 0x150], esi
mov ecx, 0x201
mov dword [ebp + 0x154], esi
je 0x51cf4f
lea edx, [esp + 0x28]
push edx
push esi
push esi
xor eax, eax
lea edi, [esp + 0x34]
rep stosd dword es:[edi], eax
push 0x44
mov dword [esp + 0x44], ebp
mov dword [esp + 0x48], ebx
push str.UDPREAD
jmp 0x51cf79
xor eax, eax
lea edi, [esp + 0x830]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x830]
push eax
push esi
push esi
push 0x3e
mov dword [esp + 0x84c], ebp
mov dword [esp + 0x850], ebx
push str.SOCKREAD
mov ecx, dword [ebp + 0x194]
xor edx, edx
push esi
call fcn.0050e610
mov eax, dword [0x5b1224]
cmp eax, esi
je 0x51d02d
cmp ebp, eax
jne 0x51cfa0
cmp ebx, dword [eax + 0x148]
je 0x51cfb2
mov eax, dword [eax + 0x198]
cmp eax, esi
jne 0x51cf94
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 0x150]
cmp eax, esi
je 0x51ce64
cmp eax, 2
je 0x51cf10
jmp 0x51cd86
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
cmp eax, 0x2733
je 0x51d02d
mov dword [ebp + 0x184], eax
mov eax, 3
jmp 0x51cfea
xor eax, eax
cmp dword [ebp + 0x18c], esi
jne 0x51d026
mov dword [ebp + 0x18c], 1
cmp dword [0x5ae60c], esi
je 0x51d026
mov esi, dword [ebp + 0x148]
push eax
push 0x3b
mov edx, ebp
mov ecx, str.SOCKCLOSE
call fcn.0051b2f0
mov edx, esi
mov ecx, ebp
call fcn.0051b1b0
test eax, eax
je 0x51d02d
mov ecx, ebp
call fcn.0051b0e0
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret