Function at 0x50b538
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffd8
push ebx
push esi
push edi
mov esi, dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.00508d4c
mov ebx, eax
test ebx, ebx
je 0x50b7d3
cmp dword [ebx + 0x14c], 2
jne 0x50b7d3
mov eax, esi
shr eax, 0x10
and ax, 0xffff
test ax, ax
je 0x50b5c5
movzx edx, ax
mov dword [ebx + 0x184], edx
cmp dword [0x56cdd8], 0
je 0x50b5ac
cmp dword [ebx + 0x158], 0
je 0x50b59d
push 3
push 0x45
push ebx
push 0x56e0d1
call fcn.00508df7
jmp 0x50b5ac
push 3
push 0x3f
push ebx
push 0x56e0db
call fcn.00508df7
push ebx
call fcn.00508cec
test eax, eax
je 0x50b7d3
push ebx
call fcn.00508c2b
jmp 0x50b7d3
cmp dword [ebx + 0x140], 0
je 0x50b7d3
mov esi, dword [ebx + 0x144]
cmp esi, 0x2000
jle 0x50b5e5
mov esi, 0x2000
cmp dword [ebx + 0x158], 0
je 0x50b679
lea eax, [ebp - 8]
mov dword [ebp - 0x1c], eax
lea edx, [ebx + 0x160]
mov dword [eax], edx
xor ecx, ecx
mov dword [eax + 4], ecx
mov word [ebp - 0x1e], 4
mov word [ebp - 0x20], 2
lea edi, [ebp - 0x28]
push 0x10
push 0
lea eax, [ebp - 0x18]
push eax
call fcn.0054e10c
add esp, 0xc
mov word [ebp - 0x18], 2
movsx edx, word [edi + 0xa]
push edx
mov ecx, dword [edi + 0xc]
push dword [ecx]
lea eax, [ebp - 0x14]
push eax
call fcn.0054e09c
add esp, 0xc
mov dx, word [ebx + 0x164]
push edx
call sub.WSOCK32.dll_htons
mov word [ebp - 0x16], ax
mov ecx, dword [edi + 0xc]
mov eax, dword [ecx]
mov edx, dword [eax]
mov dword [ebp - 0x14], edx
push 0x10
lea ecx, [ebp - 0x18]
push ecx
push 0
push esi
push dword [ebx + 0x140]
push dword [ebx + 0x18c]
call sub.WSOCK32.dll_sendto
mov esi, eax
jmp 0x50b68f
push 0
push esi
push dword [ebx + 0x140]
push dword [ebx + 0x18c]
call sub.WSOCK32.dll_send
mov esi, eax
cmp esi, 0xffffffff
jne 0x50b6f5
call sub.WSOCK32.dll_WSAGetLastError
cmp eax, 0x2733
je 0x50b7d3
mov dword [ebx + 0x184], eax
cmp dword [0x56cdd8], 0
je 0x50b6dc
cmp dword [ebx + 0x158], 0
je 0x50b6cd
push 3
push 0x45
push ebx
push 0x56e0e6
call fcn.00508df7
jmp 0x50b6dc
push 3
push 0x3f
push ebx
push 0x56e0f0
call fcn.00508df7
push ebx
call fcn.00508cec
test eax, eax
je 0x50b7d3
push ebx
call fcn.00508c2b
jmp 0x50b7d3
push 0
call fcn.0055ca2c
pop ecx
mov dword [ebx + 0x17c], eax
test esi, esi
jle 0x50b76b
add dword [ebx + 0x170], esi
cmp esi, dword [ebx + 0x144]
jge 0x50b76b
sub dword [ebx + 0x144], esi
push dword [ebx + 0x144]
mov eax, dword [ebx + 0x140]
add esi, eax
push esi
push eax
call fcn.0054e0c0
add esp, 0xc
mov edx, dword [ebx + 0x144]
add edx, 0xa
push edx
push dword [ebx + 0x140]
call fcn.0055a23c
add esp, 8
test eax, eax
je 0x50b755
mov dword [ebx + 0x140], eax
push 0
push 2
push dword [ebx + 0x18c]
push 0x8038
call fcn.00528a48
jmp 0x50b7d3
push dword [ebx + 0x140]
call fcn.00559c5c
pop ecx
xor ecx, ecx
mov dword [ebx + 0x140], ecx
xor eax, eax
mov dword [ebx + 0x144], eax
cmp dword [ebx + 0x158], 0
je 0x50b7a1
cmp dword [ebx + 0x15c], 0
jne 0x50b7a1
push ebx
call fcn.00508c2b
jmp 0x50b7d3
cmp dword [0x56cdd8], 0
je 0x50b7d3
cmp dword [ebx + 0x158], 0
je 0x50b7c4
push 0
push 0x45
push ebx
push str.UDPWRITE
call fcn.00508df7
jmp 0x50b7d3
push 0
push 0x3f
push ebx
push str.SOCKWRITE
call fcn.00508df7
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8