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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffe4
push ebx
push esi
push edi
mov esi, dword [ebp + 8]
mov edi, 1
xor eax, eax
mov dword [ebp - 0x10], eax
mov dword [ebp - 4], 1
xor edx, edx
mov dword [ebp - 8], edx
xor ecx, ecx
mov dword [ebp - 0x18], ecx
mov eax, dword [esi + 4]
test eax, eax
je 0x50b09a
cmp byte [eax], 0x2d
jne 0x50b09a
push 0x74
push eax
call fcn.0054e1ec
add esp, 8
test eax, eax
je 0x50b069
xor edx, edx
mov dword [ebp - 4], edx
push 0x6e
push dword [esi + 4]
call fcn.0054e1ec
add esp, 8
test eax, eax
je 0x50b081
mov dword [ebp - 8], 1
push 0x62
push dword [esi + 4]
call fcn.0054e1ec
add esp, 8
test eax, eax
je 0x50b099
mov dword [ebp - 0x10], 1
inc edi
cmp dword [esi + edi*4], 0
jne 0x50b0b2
push 0
push 0
push dword [esi]
push 0
call fcn.00479438
jmp 0x50b52f
mov dword [ebp - 0xc], edi
push 0x56e03c
mov ecx, dword [ebp - 0xc]
push dword [esi + ecx*4]
call fcn.0054e548
add esp, 8
test eax, eax
je 0x50b115
push 0
push dword [0x56ddbc]
mov eax, dword [ebp - 0xc]
push dword [esi + eax*4]
call fcn.00508d91
mov ebx, eax
test ebx, ebx
jne 0x50b187
push 0
push 0x145c
call fcn.0042c771
push eax
mov eax, dword [ebp - 0xc]
push dword [esi + eax*4]
push 0x56e040
push 0x5803c4
call sub.USER32.dll_wsprintfA
add esp, 0x10
xor eax, eax
jmp 0x50b52f
mov edx, dword [ebp - 0xc]
push dword [esi + edx*4]
call fcn.00508d16
mov ebx, eax
test ebx, ebx
jne 0x50b152
push 0
push 0x145d
call fcn.0042c771
push eax
mov eax, dword [ebp - 0xc]
push dword [esi + eax*4]
push 0x56e057
push 0x5803c4
call sub.USER32.dll_wsprintfA
add esp, 0x10
xor eax, eax
jmp 0x50b52f
cmp dword [ebx + 0x14c], 2
je 0x50b187
push 0
push 0x145e
call fcn.0042c771
push eax
mov edx, dword [ebp - 0xc]
push dword [esi + edx*4]
push 0x56e06e
push 0x5803c4
call sub.USER32.dll_wsprintfA
add esp, 0x10
xor eax, eax
jmp 0x50b52f
cmp dword [ebx + 0x158], 0
je 0x50b1b6
push 0
push 0x145f
call fcn.0042c771
push eax
push str.__sockwrite:__s
push 0x5803c4
call sub.USER32.dll_wsprintfA
add esp, 0xc
xor eax, eax
jmp 0x50b52f
inc edi
cmp dword [ebp - 0x10], 0
je 0x50b1db
cmp dword [esi + edi*4], 0
je 0x50b1db
push dword [esi + edi*4]
call fcn.005570e0
pop ecx
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jg 0x50b1da
xor edx, edx
mov dword [ebp - 0x10], edx
inc edi
cmp dword [esi + edi*4], 0
jne 0x50b220
cmp dword [ebp - 8], 0
jne 0x50b1f9
push 0
push 0
push dword [esi]
push 0
call fcn.00479438
jmp 0x50b52f
mov ecx, dword [ebp + 0xc]
push esi
mov esi, 0x56e097
mov edi, ecx
mov eax, edi
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
pop esi
mov edx, dword [ebp + 0xc]
mov dword [ebp - 0x1c], edx
push dword [ebp + 0xc]
call fcn.0054e28c
pop ecx
mov edi, eax
jmp 0x50b2c9
cmp dword [ebp - 4], 0
je 0x50b22e
mov eax, dword [esi + edi*4]
cmp byte [eax], 0x26
je 0x50b278
mov edx, dword [ebp + 0xc]
mov byte [edx], 0
push esi
push dword [ebp + 0xc]
push edi
call fcn.004e56b5
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x1c], ecx
push dword [ebp + 0xc]
call fcn.0054e28c
pop ecx
mov edi, eax
cmp dword [ebp - 8], 0
je 0x50b2bb
test edi, edi
jle 0x50b263
mov eax, dword [ebp + 0xc]
cmp byte [eax + edi - 1], 0xa
je 0x50b2bb
push 0x56e09b
push dword [ebp + 0xc]
call fcn.0054e1b0
add esp, 8
add edi, 2
jmp 0x50b2bb
push dword [ebp + 0x10]
push dword [esi + edi*4]
call fcn.0042aa5c
test eax, eax
jne 0x50b2b0
push 0
push 0x1457
call fcn.0042c771
push eax
push dword [esi + edi*4]
push 0x56e09f
push 0x5803c4
call sub.USER32.dll_wsprintfA
add esp, 0x10
xor eax, eax
jmp 0x50b52f
mov edx, dword [eax]
add edx, dword [eax + 0xc]
mov dword [ebp - 0x1c], edx
mov edi, dword [eax + 8]
cmp dword [ebp - 0x10], 0
je 0x50b2c9
cmp edi, dword [ebp - 0x10]
jle 0x50b2c9
mov edi, dword [ebp - 0x10]
mov dword [ebp - 0x14], edi
mov edi, dword [ebp - 0x14]
cmp dword [ebx + 0x14c], 2
jne 0x50b4f6
cmp dword [ebx + 0x140], 0
je 0x50b377
mov eax, dword [ebx + 0x144]
add eax, edi
cmp eax, 0x4000
jle 0x50b324
push 0
push 0x1458
call fcn.0042c771
push eax
mov edx, dword [ebp - 0xc]
push dword [esi + edx*4]
push str.__sockwrite:__s__s
push 0x5803c4
call sub.USER32.dll_wsprintfA
add esp, 0x10
xor eax, eax
jmp 0x50b52f
mov edx, dword [ebx + 0x144]
add edx, edi
add edx, 0xa
push edx
push dword [ebx + 0x140]
call fcn.0055a23c
add esp, 8
test eax, eax
jne 0x50b354
push 2
push 0
push dword [esi]
push 0
call fcn.00479438
jmp 0x50b52f
mov edx, eax
mov dword [ebx + 0x140], edx
push edi
push dword [ebp - 0x1c]
add edx, dword [ebx + 0x144]
push edx
call fcn.0054e09c
add esp, 0xc
add dword [ebx + 0x144], edi
jmp 0x50b3ba
lea eax, [edi + 0xa]
push eax
call fcn.00559d70
pop ecx
mov dword [ebx + 0x140], eax
cmp dword [ebx + 0x140], 0
jne 0x50b3a2
push 2
push 0
push dword [esi]
push 0
call fcn.00479438
jmp 0x50b52f
push edi
push dword [ebp - 0x1c]
push dword [ebx + 0x140]
call fcn.0054e09c
add esp, 0xc
mov dword [ebx + 0x144], edi
cmp dword [ebp - 0x18], 0
je 0x50b3d9
push 0
push 2
push dword [ebx + 0x18c]
push 0x8038
call fcn.00528a48
jmp 0x50b4f6
mov eax, dword [ebx + 0x144]
cmp eax, 0x2000
jle 0x50b3eb
mov eax, 0x2000
push 0
push eax
push dword [ebx + 0x140]
push dword [ebx + 0x18c]
call sub.WSOCK32.dll_send
mov edi, eax
cmp edi, 0xffffffff
jne 0x50b448
call sub.WSOCK32.dll_WSAGetLastError
mov dword [ebp - 0x18], 1
cmp eax, 0x2733
je 0x50b4f6
mov dword [ebx + 0x184], eax
movzx eax, ax
shl eax, 0x10
or eax, 2
push eax
push dword [ebx + 0x18c]
push 0x8038
push dword [0x56f018]
call sub.USER32.dll_PostMessageA
jmp 0x50b4f6
push 0
call fcn.0055ca2c
pop ecx
mov dword [ebx + 0x17c], eax
test edi, edi
jle 0x50b4be
add dword [ebx + 0x170], edi
cmp edi, dword [ebx + 0x144]
jge 0x50b4be
sub dword [ebx + 0x144], edi
push dword [ebx + 0x144]
mov eax, dword [ebx + 0x140]
add edi, eax
push edi
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 0x50b4a8
mov dword [ebx + 0x140], eax
push 0
push 2
push dword [ebx + 0x18c]
push 0x8038
call fcn.00528a48
jmp 0x50b4f6
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 [0x56cdd8], 0
je 0x50b4f6
push ebx
push 0
push 0x803a
push dword [0x56f018]
call sub.USER32.dll_PostMessageA
push 0x56e0cd
mov edx, dword [ebp - 0xc]
push dword [esi + edx*4]
call fcn.0054e548
add esp, 8
test eax, eax
je 0x50b52a
push 0
push dword [ebx + 0x194]
mov ecx, dword [ebp - 0xc]
push dword [esi + ecx*4]
call fcn.00508d91
mov ebx, eax
test ebx, ebx
jne 0x50b2cc
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc