Function at 0x10039cf0
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Get local ipv4 addresses
Get socket information
Send data
Send data on socket

Disassembly:
sub esp, 0xfc
push esi
mov esi, dword [esp + 0x104]
test esi, esi
jne 0x10039d0d
or eax, 0xffffffff
pop esi
add esp, 0xfc
ret
xor eax, eax
push ebp
mov dword [esp + 0x14], eax
push 6
mov dword [esp + 0x1c], eax
push 1
mov dword [esp + 0x24], eax
push 2
mov dword [esp + 0x2c], eax
call dword [sym.imp.WSOCK32.dll_socket]
or ebp, 0xffffffff
cmp eax, ebp
mov dword [esi + 0x30], eax
mov word [esp + 0x14], 2
mov dword [esp + 0x10], 0x10
jne 0x10039d61
push str.socket_failed
push 0
push 9
call fcn.10017850
add esp, 0xc
mov eax, ebp
pop ebp
pop esi
add esp, 0xfc
ret
mov ecx, dword [esi + 0x28]
test ecx, ecx
push edi
je 0x10039f04
push str.PASV_r_n
lea ecx, [esp + 0x44]
push 0xc8
push ecx
call dword [sym.imp.MSVCR120.dll__snprintf]
lea eax, [esp + 0x4c]
add esp, 0xc
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10039d90
sub eax, edx
push 0
push eax
mov eax, dword [esi + 0x2c]
lea edx, [esp + 0x48]
push edx
push eax
call dword [sym.imp.WSOCK32.dll_send]
test eax, eax
jge 0x10039dd9
push str.send_failed
push 0
push 9
call fcn.10017850
add esp, 0xc
mov ecx, dword [esi + 0x30]
push ecx
call dword [sym.imp.WSOCK32.dll_closesocket]
pop edi
mov dword [esi + 0x30], ebp
mov eax, ebp
pop ebp
pop esi
add esp, 0xfc
ret
mov eax, esi
call fcn.100394a0
cmp eax, 2
mov edi, dword [sym.imp.WSOCK32.dll_closesocket]
je 0x10039e04
cmp eax, 5
je 0x10039f91
mov eax, dword [esi + 0x30]
push eax
call edi
mov dword [esi + 0x30], ebp
mov dword [esi + 0x28], 0
mov ecx, dword [esi + 0x448]
lea ecx, [ecx + esi + 0x3c]
mov edi, edi
mov al, byte [ecx]
cmp al, 0x30
jl 0x10039e1a
cmp al, 0x39
jle 0x10039e21
test al, al
je 0x10039e21
inc ecx
jmp 0x10039e10
lea edx, [esp + 0x3c]
push edx
lea eax, [esp + 0x3c]
push eax
lea edx, [esp + 0x3c]
push edx
lea eax, [esp + 0x3c]
push eax
lea edx, [esp + 0x3c]
push edx
lea eax, [esp + 0x3c]
push eax
push str._u__u__u__u__u__u
push ecx
call dword [sym.imp.MSVCR120.dll_sscanf]
add esp, 0x20
cmp eax, 6
je 0x10039e80
push str.Invalid_answer_to_PASV_n
push 0x7d0
push 9
call fcn.10017850
mov eax, dword [esi + 0x30]
add esp, 0xc
cmp eax, ebp
je 0x10039e74
push eax
call edi
mov dword [esi + 0x30], ebp
pop edi
mov eax, ebp
pop ebp
pop esi
add esp, 0xfc
ret
mov cl, byte [esp + 0x28]
mov dl, byte [esp + 0x2c]
mov al, byte [esp + 0x30]
mov byte [esp + 0xc], cl
mov cl, byte [esp + 0x34]
mov byte [esp + 0xd], dl
mov dl, byte [esp + 0x38]
mov byte [esp + 0xe], al
mov al, byte [esp + 0x3c]
mov byte [esp + 0xf], cl
mov ecx, dword [esp + 0xc]
mov byte [esp + 0x11], al
mov eax, dword [esp + 0x14]
mov byte [esp + 0x10], dl
mov dx, word [esp + 0x10]
mov dword [esp + 0x1c], ecx
push eax
lea ecx, [esp + 0x1c]
mov word [esp + 0x1e], dx
mov edx, dword [esi + 0x30]
push ecx
push edx
call dword [sym.imp.WSOCK32.dll_connect]
test eax, eax
jge 0x1003a02e
push str.Failed_to_create_a_data_connection
push 0
push 9
call fcn.10017850
mov eax, dword [esi + 0x30]
add esp, 0xc
push eax
call edi
pop edi
mov dword [esi + 0x30], ebp
mov eax, ebp
pop ebp
pop esi
add esp, 0xfc
ret
mov edi, dword [sym.imp.WSOCK32.dll_getsockname]
lea ecx, [esp + 0x14]
push ecx
lea edx, [esp + 0x1c]
push edx
push eax
call edi
mov eax, dword [esp + 0x14]
mov edx, dword [esi + 0x30]
push eax
lea ecx, [esp + 0x1c]
push ecx
push edx
mov word [esp + 0x26], 0
call dword [sym.imp.WSOCK32.dll_bind]
test eax, eax
jge 0x10039f60
push str.bind_failed
push 0
push 9
call fcn.10017850
mov eax, dword [esi + 0x30]
add esp, 0xc
push eax
call dword [sym.imp.WSOCK32.dll_closesocket]
pop edi
mov dword [esi + 0x30], ebp
mov eax, ebp
pop ebp
pop esi
add esp, 0xfc
ret
mov eax, dword [esi + 0x30]
lea ecx, [esp + 0x14]
push ecx
lea edx, [esp + 0x1c]
push edx
push eax
call edi
mov ecx, dword [esi + 0x30]
push 1
push ecx
call dword [sym.imp.WSOCK32.dll_listen]
test eax, eax
jge 0x10039faa
push str.listen_failed
push 0
push 9
call fcn.10017850
add esp, 0xc
mov edx, dword [esi + 0x30]
push edx
call dword [sym.imp.WSOCK32.dll_closesocket]
pop edi
mov dword [esi + 0x30], ebp
mov eax, ebp
pop ebp
pop esi
add esp, 0xfc
ret
movzx eax, byte [esp + 0x1b]
movzx ecx, byte [esp + 0x1a]
movzx edx, byte [esp + 0x1f]
push eax
movzx eax, byte [esp + 0x22]
push ecx
movzx ecx, byte [esp + 0x25]
push edx
movzx edx, byte [esp + 0x28]
push eax
push ecx
push edx
push str.PORT__d__d__d__d__d__d_r_n
lea eax, [esp + 0x5c]
push 0xc8
push eax
call dword [sym.imp.MSVCR120.dll__snprintf]
lea eax, [esp + 0x64]
add esp, 0x24
mov byte [esp + 0x107], 0
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10039ff5
push 0
sub eax, edx
mov edx, dword [esi + 0x2c]
push eax
lea ecx, [esp + 0x48]
push ecx
push edx
call dword [sym.imp.WSOCK32.dll_send]
test eax, eax
jge 0x1003a01e
push str.send_failed
jmp 0x10039f3b
mov eax, esi
call fcn.100394a0
cmp eax, 2
jne 0x10039dc0
mov eax, dword [esi + 0x30]
pop edi
pop ebp
pop esi
add esp, 0xfc
ret