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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov dword [ebp - 0x20], ecx
cmp dword [ebp + 0x10], 0
jne 0x516e48
mov dword [ebp + 0x10], 0x7fff
jmp 0x516e6a
cmp dword [ebp + 0x10], 0x3e8
jae 0x516e5a
mov dword [ebp + 0x10], 0x3e8
jmp 0x516e6a
cmp dword [ebp + 0x10], 0x1e8480
jbe 0x516e6a
mov dword [ebp + 0x10], 0x1e8480
mov eax, dword [ebp - 0x20]
mov dword [eax + 0x108], 0
mov ecx, dword [ebp - 0x20]
mov edx, dword [ecx + 0x100]
mov dword [ebp - 4], edx
cmp dword [ebp - 4], 0
jne 0x516e90
mov dword [ebp - 4], 0x1499700
mov eax, dword [ebp - 0x20]
cmp dword [eax + 0xa4], 0xffffffff
jne 0x516eb5
push str.No_socket_exists_for_sending__2b_
mov ecx, dword [ebp + 0x18]
mov edx, dword [ecx]
mov ecx, dword [ebp + 0x18]
mov eax, dword [edx + 0x14]
call eax
xor al, al
jmp 0x5171a4
mov ecx, dword [ebp - 0x20]
call fcn.005104e0
cmp dword [ebp + 0xc], 0
je 0x51719a
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 0x14], ecx
mov edx, dword [ebp - 0x14]
cmp edx, dword [ebp + 0xc]
jbe 0x516edb
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x14], eax
mov dword [ebp - 8], 0
cmp dword [ebp + 0x1c], 0
je 0x516f1d
push 0x174
mov ecx, dword [ebp + 0x14]
push ecx
mov ecx, dword [ebp + 0x1c]
call fcn.0049ce90
mov byte [ebp - 0x15], al
movzx edx, byte [ebp - 0x15]
test edx, edx
je 0x516f1d
push str.Socket_SendBytes2_aborted_by_application.__1a_
mov eax, dword [ebp + 0x18]
mov edx, dword [eax]
mov ecx, dword [ebp + 0x18]
mov eax, dword [edx + 0x14]
call eax
xor al, al
jmp 0x5171a4
mov byte [ebp - 0xd], 0
lea ecx, [ebp - 0xd]
push ecx
mov edx, dword [ebp + 0x1c]
push edx
mov eax, dword [ebp + 0x14]
push eax
mov ecx, dword [ebp - 0x20]
add ecx, 0xb0
call fcn.0056fcc0
movzx ecx, byte [ebp - 0xd]
test ecx, ecx
je 0x516f5c
push str.Aborted_by_application_while_upload_throttling__1b_
mov edx, dword [ebp + 0x18]
mov eax, dword [edx]
mov ecx, dword [ebp + 0x18]
mov edx, dword [eax + 0x14]
call edx
xor al, al
jmp 0x5171a4
mov eax, dword [ebp - 0x20]
mov dword [eax + 0x108], 0
push 0
mov ecx, dword [ebp - 0x14]
push ecx
mov edx, dword [ebp + 8]
push edx
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax + 0xa4]
push ecx
call dword [sym.imp.WS2_32.dll_send]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0xffffffff
je 0x516f92
cmp dword [ebp - 0xc], 0
jge 0x516fa7
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 8], eax
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp - 8]
mov dword [edx + 0x108], eax
cmp dword [ebp - 0xc], 0xffffffff
je 0x516fb7
cmp dword [ebp - 0xc], 0
jge 0x5170e8
cmp dword [ebp - 8], 0x2733
jne 0x517075
mov byte [ebp - 0x18], 0
mov byte [ebp - 0x19], 0
mov byte [ebp - 0x16], 0
mov byte [ebp - 0x17], 0
lea ecx, [ebp - 0x16]
push ecx
lea edx, [ebp - 0x19]
push edx
lea eax, [ebp - 0x18]
push eax
lea ecx, [ebp - 0x17]
push ecx
mov edx, dword [ebp + 0x1c]
push edx
mov eax, dword [ebp + 0x18]
push eax
push 0
mov ecx, dword [ebp - 4]
push ecx
push 0
mov edx, dword [ebp + 0x14]
push edx
mov ecx, dword [ebp - 0x20]
call fcn.00515d90
movzx eax, al
test eax, eax
je 0x517009
jmp 0x517073
mov ecx, dword [ebp - 0x20]
call fcn.00510520
movzx ecx, byte [ebp - 0x18]
test ecx, ecx
je 0x51702d
push 0x67cdf4
mov edx, dword [ebp + 0x18]
mov eax, dword [edx]
mov ecx, dword [ebp + 0x18]
mov edx, dword [eax + 0x14]
call edx
jmp 0x51706c
movzx eax, byte [ebp - 0x19]
test eax, eax
je 0x51705a
mov ecx, dword [ebp - 4]
push ecx
push 0x67ce18
mov ecx, dword [ebp + 0x18]
call fcn.004835c0
push 0x67ce28
mov edx, dword [ebp + 0x18]
mov eax, dword [edx]
mov ecx, dword [ebp + 0x18]
mov edx, dword [eax + 0x14]
call edx
jmp 0x51706c
push str.Socket_send_failed
mov eax, dword [ebp + 0x18]
mov edx, dword [eax]
mov ecx, dword [ebp + 0x18]
mov eax, dword [edx + 0x14]
call eax
xor al, al
jmp 0x5171a4
jmp 0x5170e8
mov ecx, dword [ebp + 0x18]
push ecx
mov edx, dword [ebp - 8]
push edx
call fcn.00511470
add esp, 8
push str.Error_sending_on_socket__1_
mov eax, dword [ebp + 0x18]
mov edx, dword [eax]
mov ecx, dword [ebp + 0x18]
mov eax, dword [edx + 0x14]
call eax
mov ecx, dword [ebp - 0x14]
push ecx
push 0x67ce74
mov ecx, dword [ebp + 0x18]
call fcn.004835c0
push 2
mov edx, dword [ebp - 0x20]
mov eax, dword [edx + 0xa4]
push eax
call dword [sym.imp.WS2_32.dll_shutdown]
mov ecx, dword [ebp - 0x20]
mov edx, dword [ecx + 0xa4]
push edx
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, dword [ebp - 0x20]
mov dword [eax + 0xa4], 0xffffffff
mov ecx, dword [ebp - 0x20]
mov byte [ecx + 0xa0], 0
xor al, al
jmp 0x5171a4
cmp dword [ebp - 0xc], 0
jle 0x517121
mov edx, dword [ebp - 0xc]
push edx
mov ecx, dword [ebp - 0x20]
add ecx, 0xb0
call fcn.0056fc30
mov eax, dword [ebp - 0x20]
movzx ecx, byte [eax + 0x16c]
test ecx, ecx
je 0x517121
mov edx, dword [ebp + 0x1c]
push edx
mov eax, dword [ebp - 0xc]
push eax
mov ecx, dword [ebp - 0x20]
add ecx, 0x58
call fcn.0051be70
cmp dword [ebp + 0x1c], 0
je 0x51716d
cmp dword [ebp - 0xc], 0
jle 0x51716d
mov byte [ebp - 0x1a], 0
cmp dword [ebp + 0x1c], 0
je 0x517147
lea ecx, [ebp - 0x1a]
push ecx
mov edx, dword [ebp - 0xc]
push edx
mov ecx, dword [ebp + 0x1c]
call fcn.0049d270
movzx eax, byte [ebp - 0x1a]
test eax, eax
je 0x51716d
mov ecx, dword [ebp - 0x20]
call fcn.00510520
push 0x67ce80
mov ecx, dword [ebp + 0x18]
mov edx, dword [ecx]
mov ecx, dword [ebp + 0x18]
mov eax, dword [edx + 0x14]
call eax
xor al, al
jmp 0x5171a4
cmp dword [ebp - 0xc], 0
jle 0x517185
mov ecx, dword [ebp + 0xc]
sub ecx, dword [ebp - 0xc]
mov dword [ebp + 0xc], ecx
mov edx, dword [ebp + 8]
add edx, dword [ebp - 0xc]
mov dword [ebp + 8], edx
cmp dword [ebp - 0xc], 0
jne 0x517195
push 1
call fcn.004824f0
add esp, 4
jmp 0x516ebd
mov ecx, dword [ebp - 0x20]
call fcn.00510520
mov al, 1
mov esp, ebp
pop ebp
ret 0x18