Function at 0x1001f110
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 0x1001f12d
or eax, 0xffffffff
pop esi
add esp, 0xfc
ret
push ebp
xor eax, eax
push edi
mov dword [esp + 0x10], eax
push 6
mov dword [esp + 0x18], eax
push 1
mov dword [esp + 0x20], eax
push 2
mov dword [esp + 0x28], eax
call dword [sym.imp.WSOCK32.dll_socket]
mov ecx, dword [esi + 0x28]
test ecx, ecx
mov dword [esi + 0x30], eax
mov word [esp + 0x10], 2
mov dword [esp + 0xc], 0x10
je 0x1001f2f2
push str.PASV_r_n
lea ecx, [esp + 0x44]
push 0xc8
push ecx
call dword [sym.imp.msvcrt.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 0x1001f190
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]
mov edi, eax
test edi, edi
jge 0x1001f1df
push str.send_failed
push 0
push 9
call fcn.100651c0
mov ecx, dword [esi + 0x30]
add esp, 0xc
push ecx
call dword [sym.imp.WSOCK32.dll_closesocket]
mov eax, edi
pop edi
pop ebp
mov dword [esi + 0x30], 0xffffffff
pop esi
add esp, 0xfc
ret
mov eax, esi
call fcn.1001e6c0
mov ebp, dword [sym.imp.WSOCK32.dll_closesocket]
or edi, 0xffffffff
cmp eax, 2
je 0x1001f20d
cmp eax, 5
je 0x1001f335
mov eax, dword [esi + 0x30]
push eax
call ebp
mov dword [esi + 0x30], edi
mov dword [esi + 0x28], 0
mov ecx, dword [esi + 0x448]
lea ecx, [ecx + esi + 0x3c]
mov al, byte [ecx]
cmp al, 0x30
jl 0x1001f221
cmp al, 0x39
jle 0x1001f228
test al, al
je 0x1001f228
inc ecx
jmp 0x1001f217
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.msvcrt.dll_sscanf]
add esp, 0x20
cmp eax, 6
je 0x1001f287
push str.Invalid_answer_to_PASV_n
push 0x7d0
push 9
call fcn.100651c0
mov eax, dword [esi + 0x30]
add esp, 0xc
cmp eax, edi
je 0x1001f27b
push eax
call ebp
mov dword [esi + 0x30], edi
mov eax, edi
pop edi
pop ebp
pop esi
add esp, 0xfc
ret
xor eax, eax
lea esp, [esp]
mov cl, byte [esp + eax*4 + 0x28]
mov byte [esp + eax + 0x20], cl
inc eax
cmp eax, 6
jl 0x1001f290
mov edx, dword [esp + 0x20]
mov ecx, dword [esp + 0xc]
mov ax, word [esp + 0x24]
mov dword [esp + 0x14], edx
push ecx
lea edx, [esp + 0x14]
mov word [esp + 0x16], ax
mov eax, dword [esi + 0x30]
push edx
push eax
call dword [sym.imp.WSOCK32.dll_connect]
test eax, eax
jge 0x1001f467
push str.Failed_to_create_a_data_connection
push 0
push 9
call fcn.100651c0
mov ecx, dword [esi + 0x30]
add esp, 0xc
push ecx
call ebp
mov dword [esi + 0x30], edi
mov eax, edi
pop edi
pop ebp
pop esi
add esp, 0xfc
ret
mov edi, dword [sym.imp.WSOCK32.dll_getsockname]
lea edx, [esp + 0xc]
push edx
lea ecx, [esp + 0x14]
push ecx
push eax
call edi
mov edx, dword [esp + 0xc]
mov ecx, dword [esi + 0x30]
push edx
lea eax, [esp + 0x14]
push eax
push ecx
mov word [esp + 0x1e], 0
call dword [sym.imp.WSOCK32.dll_bind]
test eax, eax
jge 0x1001f351
push str.bind_failed
push 0
push 9
call fcn.100651c0
add esp, 0xc
mov edx, dword [esi + 0x30]
push edx
call dword [sym.imp.WSOCK32.dll_closesocket]
or edi, 0xffffffff
mov dword [esi + 0x30], edi
mov eax, edi
pop edi
pop ebp
pop esi
add esp, 0xfc
ret
mov edx, dword [esi + 0x30]
lea eax, [esp + 0xc]
push eax
lea ecx, [esp + 0x14]
push ecx
push edx
call edi
mov eax, dword [esi + 0x30]
push 1
push eax
call dword [sym.imp.WSOCK32.dll_listen]
test eax, eax
jge 0x1001f39e
push str.listen_failed
push 0
push 9
call fcn.100651c0
mov ecx, dword [esi + 0x30]
add esp, 0xc
push ecx
call dword [sym.imp.WSOCK32.dll_closesocket]
or edi, 0xffffffff
mov dword [esi + 0x30], edi
mov eax, edi
pop edi
pop ebp
pop esi
add esp, 0xfc
ret
movzx edx, byte [esp + 0x13]
movzx eax, byte [esp + 0x12]
movzx ecx, byte [esp + 0x17]
push edx
movzx edx, byte [esp + 0x1a]
push eax
movzx eax, byte [esp + 0x1d]
push ecx
movzx ecx, byte [esp + 0x20]
push edx
push eax
push ecx
push str.PORT__d__d__d__d__d__d_r_n
lea edx, [esp + 0x5c]
push 0xc8
push edx
call dword [sym.imp.msvcrt.dll__snprintf]
lea eax, [esp + 0x64]
add esp, 0x24
mov byte [esp + 0x107], 0
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1001f3f0
mov ecx, dword [esi + 0x2c]
push 0
sub eax, edx
push eax
lea eax, [esp + 0x48]
push eax
push ecx
call dword [sym.imp.WSOCK32.dll_send]
mov edi, eax
test edi, edi
jge 0x1001f43f
push str.send_failed
push 0
push 9
call fcn.100651c0
mov edx, dword [esi + 0x30]
add esp, 0xc
push edx
call dword [sym.imp.WSOCK32.dll_closesocket]
mov eax, edi
pop edi
pop ebp
mov dword [esi + 0x30], 0xffffffff
pop esi
add esp, 0xfc
ret
mov eax, esi
call fcn.1001e6c0
cmp eax, 2
je 0x1001f467
mov eax, dword [esi + 0x30]
push eax
call dword [sym.imp.WSOCK32.dll_closesocket]
or edi, 0xffffffff
mov dword [esi + 0x30], edi
mov eax, edi
pop edi
pop ebp
pop esi
add esp, 0xfc
ret
mov eax, dword [esi + 0x30]
pop edi
pop ebp
pop esi
add esp, 0xfc
ret