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

Disassembly:
sub esp, 0x14
push ebx
push ebp
mov ebp, ecx
mov eax, dword [ebp + 4]
xor ecx, ecx
cmp eax, ecx
push esi
mov esi, 1
push edi
mov edi, edx
mov dword [esp + 0x10], ebp
mov dword [esp + 0x14], ecx
mov ebx, esi
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], ecx
je 0x51d574
cmp byte [eax], 0x2d
jne 0x51d574
push 0x74
push eax
call fcn.00570260
add esp, 8
test eax, eax
je 0x51d541
xor ebx, ebx
mov eax, dword [ebp + 4]
push 0x6e
push eax
call fcn.00570260
add esp, 8
test eax, eax
je 0x51d557
mov dword [esp + 0x18], esi
mov ecx, dword [ebp + 4]
push 0x62
push ecx
call fcn.00570260
add esp, 8
test eax, eax
je 0x51d56d
mov dword [esp + 0x14], esi
mov esi, 2
xor ecx, ecx
mov eax, dword [ebp + esi*4]
cmp eax, ecx
jne 0x51d592
mov edx, dword [ebp]
push ecx
push ecx
xor ecx, ecx
call fcn.00479790
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret 4
push 0x5846fc
push eax
mov dword [esp + 0x28], esi
call fcn.00571fd0
mov ecx, dword [ebp + esi*4]
add esp, 8
test eax, eax
je 0x51d5d9
mov edx, dword [0x5b1224]
push 0
call fcn.0051b280
mov ebp, eax
test ebp, ebp
jne 0x51d620
xor edx, edx
mov ecx, 0x145c
call fcn.0041d620
mov edx, dword [esp + 0x10]
push eax
mov eax, dword [edx + esi*4]
push eax
jmp 0x51d9b7
call fcn.0051b1e0
mov ebp, eax
test ebp, ebp
jne 0x51d5fd
xor edx, edx
mov ecx, 0x145d
call fcn.0041d620
mov ecx, dword [esp + 0x10]
mov edx, dword [ecx + esi*4]
push eax
jmp 0x51d9b6
cmp dword [ebp + 0x14c], 2
je 0x51d620
xor edx, edx
mov ecx, 0x145e
call fcn.0041d620
push eax
mov eax, dword [esp + 0x14]
mov ecx, dword [eax + esi*4]
push ecx
jmp 0x51d9b7
mov eax, dword [ebp + 0x158]
test eax, eax
je 0x51d656
xor edx, edx
mov ecx, 0x145f
call fcn.0041d620
push eax
push str.__sockwrite:__s
push 0x5a7240
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x14
ret 4
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x10]
inc esi
test eax, eax
je 0x51d688
mov eax, dword [edx + esi*4]
test eax, eax
je 0x51d688
push eax
call fcn.005705cb
add esp, 4
test eax, eax
mov dword [esp + 0x14], eax
jg 0x51d683
mov dword [esp + 0x14], 0
mov edx, dword [esp + 0x10]
inc esi
mov ecx, dword [edx + esi*4]
test ecx, ecx
jne 0x51d6d5
mov eax, dword [esp + 0x18]
test eax, eax
jne 0x51d6aa
mov edx, dword [edx]
push ecx
push ecx
call fcn.00479790
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret 4
mov ax, word [0x583b70]
mov edx, edi
mov word [edx], ax
mov cl, byte [0x583b72]
mov eax, edi
mov byte [edx + 2], cl
mov dword [esp + 0x28], edi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x51d6c7
sub eax, edx
jmp 0x51d77c
test ebx, ebx
je 0x51d715
cmp byte [ecx], 0x26
jne 0x51d715
mov edx, dword [esp + 0x28]
call fcn.0041bb90
test eax, eax
jne 0x51d705
xor edx, edx
mov ecx, 0x1457
call fcn.0041d620
mov edx, dword [esp + 0x10]
push eax
mov eax, dword [edx + esi*4]
push eax
jmp 0x51d9b7
mov ecx, dword [eax + 0xc]
mov edx, dword [eax]
mov eax, dword [eax + 8]
add ecx, edx
mov dword [esp + 0x28], ecx
jmp 0x51d76e
push edx
mov edx, edi
mov ecx, esi
mov byte [edi], 0
call fcn.004f4660
mov eax, edi
mov dword [esp + 0x28], edi
lea edx, [eax + 1]
jmp 0x51d730
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x51d730
mov ecx, dword [esp + 0x18]
sub eax, edx
test ecx, ecx
je 0x51d76e
test eax, eax
jle 0x51d74c
cmp byte [eax + edi - 1], 0xa
je 0x51d76e
dec edi
lea ecx, [ecx]
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x51d750
mov cx, word [0x583b70]
mov word [edi], cx
mov dl, byte [0x583b72]
mov byte [edi + 2], dl
add eax, 2
mov ecx, dword [esp + 0x14]
test ecx, ecx
je 0x51d77c
cmp ecx, eax
jge 0x51d77c
mov eax, ecx
mov ebx, eax
mov edi, edi
cmp dword [ebp + 0x14c], 2
jne 0x51d958
mov ecx, dword [ebp + 0x140]
test ecx, ecx
je 0x51d7e9
mov eax, dword [ebp + 0x144]
add eax, ebx
cmp eax, 0x4000
jg 0x51d99e
add eax, 0xa
push eax
push ecx
call fcn.00571c26
add esp, 8
test eax, eax
je 0x51d9d6
mov edi, dword [ebp + 0x144]
mov esi, dword [esp + 0x28]
mov ecx, ebx
mov edx, ecx
shr ecx, 2
add edi, eax
mov dword [ebp + 0x140], eax
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
add dword [ebp + 0x144], ebx
jmp 0x51d81f
lea eax, [ebx + 0xa]
push eax
call fcn.00570098
add esp, 4
test eax, eax
mov dword [ebp + 0x140], eax
je 0x51d9f1
mov esi, dword [esp + 0x28]
mov ecx, ebx
mov edx, ecx
shr ecx, 2
mov edi, eax
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov dword [ebp + 0x144], ebx
mov eax, dword [esp + 0x1c]
xor edi, edi
cmp eax, edi
je 0x51d841
mov edx, dword [ebp + 0x190]
push edi
push 2
mov ecx, 0x8038
call fcn.0054c250
jmp 0x51d958
mov eax, dword [ebp + 0x144]
cmp eax, 0x2000
jle 0x51d853
mov eax, 0x2000
mov ecx, dword [ebp + 0x190]
push edi
push eax
mov eax, dword [ebp + 0x140]
push eax
push ecx
call dword [sym.imp.WSOCK32.dll_send]
mov esi, eax
cmp esi, 0xffffffff
jne 0x51d8aa
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
cmp eax, 0x2733
mov dword [esp + 0x1c], 1
je 0x51d958
movzx edx, ax
shl edx, 0x10
or edx, 2
mov dword [ebp + 0x184], eax
mov eax, dword [ebp + 0x190]
push edx
push eax
push 0x8038
jmp 0x51d94b
push edi
call fcn.00570bc6
add esp, 4
cmp esi, edi
mov dword [ebp + 0x17c], eax
jle 0x51d91a
mov edx, dword [ebp + 0x170]
mov eax, dword [ebp + 0x144]
add edx, esi
cmp esi, eax
mov dword [ebp + 0x170], edx
jge 0x51d91a
mov ecx, dword [ebp + 0x140]
sub eax, esi
push eax
lea edx, [ecx + esi]
push edx
push ecx
mov dword [ebp + 0x144], eax
call fcn.00571040
mov eax, dword [ebp + 0x144]
mov ecx, dword [ebp + 0x140]
add eax, 0xa
push eax
push ecx
call fcn.00571c26
add esp, 0x14
cmp eax, edi
je 0x51d829
mov dword [ebp + 0x140], eax
jmp 0x51d829
mov edx, dword [ebp + 0x140]
push edx
call fcn.005700aa
mov dword [ebp + 0x140], edi
mov dword [ebp + 0x144], edi
mov eax, dword [0x5ae60c]
add esp, 4
cmp eax, edi
je 0x51d958
mov eax, dword [ebp + 0x148]
push ebp
push eax
push 0x803a
mov ecx, dword [0x5b4314]
push ecx
call dword [sym.imp.USER32.dll_PostMessageA]
mov edi, dword [esp + 0x10]
mov esi, dword [esp + 0x20]
mov edx, dword [edi + esi*4]
push 0x5846fc
push edx
call fcn.00571fd0
add esp, 8
test eax, eax
je 0x51d98f
mov edx, dword [ebp + 0x198]
mov ecx, dword [edi + esi*4]
push 0
call fcn.0051b280
mov ebp, eax
test ebp, ebp
jne 0x51d780
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x14
ret 4
xor edx, edx
mov ecx, 0x1458
call fcn.0041d620
mov ecx, dword [esp + 0x20]
push eax
mov eax, dword [esp + 0x14]
mov edx, dword [eax + ecx*4]
push edx
push str.__sockwrite:__s__s
push 0x5a7240
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x14
ret 4
mov eax, dword [esp + 0x10]
mov edx, dword [eax]
push 2
push 0
xor ecx, ecx
call fcn.00479790
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret 4
mov ecx, dword [esp + 0x10]
mov edx, dword [ecx]
push 2
push 0
xor ecx, ecx
call fcn.00479790
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret 4