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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x2010
call fcn.00565660
push ebx
push ebp
mov ebp, dword [0x59f670]
push esi
xor esi, esi
cmp ebp, esi
push edi
je 0x514fc7
cmp dword [ebp + 0x18c], ecx
je 0x514cce
mov ebp, dword [ebp + 0x194]
cmp ebp, esi
jne 0x514cb4
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [ebp + 0x14c], 2
jne 0x514fc7
mov eax, edx
shr eax, 0x10
cmp ax, si
je 0x514d26
movzx eax, ax
mov dword [ebp + 0x184], eax
cmp dword [0x59ca60], esi
je 0x514fb5
cmp dx, 0x20
push 3
je 0x514fa7
cmp dword [ebp + 0x158], esi
je 0x514d1a
push 0x44
mov ecx, str.UDPREAD
jmp 0x514fae
push 0x3e
mov ecx, str.SOCKREAD
jmp 0x514fae
push esi
call fcn.00563e36
mov edx, dword [ebp + 0x18c]
add esp, 4
push 1
push 1
mov ecx, 0x8038
mov dword [ebp + 0x180], eax
call fcn.0053f9b0
test eax, eax
jne 0x514fc7
mov ecx, dword [ebp + 0x188]
inc ecx
mov eax, ecx
cmp eax, 0x14
mov dword [ebp + 0x188], ecx
jl 0x514d86
mov edx, dword [ebp + 0x18c]
push esi
push 1
mov ecx, 0x8038
mov dword [ebp + 0x188], esi
call fcn.0053f9b0
test eax, eax
jne 0x514fc7
mov edx, dword [ebp + 0x138]
mov eax, 0x1001
sub eax, edx
cmp eax, 1
jle 0x514ee0
mov ecx, dword [ebp + 0x158]
dec eax
cmp ecx, esi
je 0x514dfd
lea ecx, [esp + 0x14]
push ecx
mov ecx, dword [ebp + 0x18c]
lea edx, [esp + 0x1c]
push edx
push esi
push eax
lea eax, [esp + 0x1028]
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 0x514e16
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 0x514e16
mov edx, dword [ebp + 0x18c]
push esi
push eax
lea ecx, [esp + 0x1020]
push ecx
push edx
call dword [sym.imp.WSOCK32.dll_recv]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x514f82
cmp ebx, esi
jle 0x514f9c
cmp dword [0x59ca60], esi
jne 0x514e53
mov eax, dword [ebp + 0x134]
cmp eax, esi
je 0x514e42
push eax
call fcn.005635b5
add esp, 4
mov dword [ebp + 0x134], esi
mov dword [ebp + 0x138], esi
jmp 0x514d51
mov eax, dword [ebp + 0x134]
cmp eax, esi
je 0x514e81
mov ecx, dword [ebp + 0x138]
lea edx, [ecx + ebx + 0xa]
push edx
push eax
call fcn.00564c59
add esp, 8
cmp eax, esi
je 0x514d51
mov dword [ebp + 0x134], eax
jmp 0x514e9b
lea eax, [ebx + 0xa]
push eax
call fcn.005635a3
add esp, 4
cmp eax, esi
mov dword [ebp + 0x134], eax
je 0x514d51
mov edi, dword [ebp + 0x138]
add edi, dword [ebp + 0x134]
mov ecx, ebx
mov edx, ecx
shr ecx, 2
lea esi, [esp + 0x1018]
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
jmp 0x514ee0
cmp dword [ebp + 0x158], esi
mov dword [ebp + 0x150], esi
mov ecx, 0x1fe
mov dword [ebp + 0x154], esi
je 0x514f15
lea edx, [esp + 0x28]
push edx
push esi
push esi
xor eax, eax
lea edi, [esp + 0x34]
push 0x44
rep stosd dword es:[edi], eax
mov dword [esp + 0x44], ebp
push str.UDPREAD
jmp 0x514f38
xor eax, eax
lea edi, [esp + 0x820]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x820]
push eax
push esi
push esi
push 0x3e
mov dword [esp + 0x83c], ebp
push str.SOCKREAD
mov ecx, dword [ebp + 0x190]
xor edx, edx
push esi
call fcn.00506dd0
mov eax, dword [0x59f670]
cmp eax, esi
je 0x514fc7
nop
cmp ebp, eax
je 0x514f66
mov eax, dword [eax + 0x194]
cmp eax, esi
jne 0x514f50
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 0x150]
cmp eax, esi
je 0x514e2f
cmp eax, 2
je 0x514ee0
jmp 0x514d51
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
cmp eax, 0x2733
je 0x514fc7
mov dword [ebp + 0x184], eax
mov eax, 3
jmp 0x514f9e
xor eax, eax
cmp dword [0x59ca60], esi
je 0x514fc0
push eax
push 0x3b
mov ecx, str.SOCKCLOSE
mov edx, ebp
call fcn.00513350
mov ecx, ebp
call fcn.00513210
test eax, eax
je 0x514fc7
mov ecx, ebp
call fcn.00513140
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret