Function at 0x10025a40
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:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x108
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0x104], eax
push esi
mov esi, dword [ebp + 8]
push edi
test esi, esi
je 0x10025aac
push 6
xor eax, eax
push 1
push 2
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
call dword [sym.imp.WS2_32.dll_socket]
mov ecx, 2
mov dword [esi + 0x30], eax
mov word [esp + 0x28], cx
mov dword [esp + 0xc], 0x10
cmp eax, 0xffffffff
jne 0x10025ac3
push str.socket_failed
push 9
xor eax, eax
call fcn.10071a30
add esp, 8
or eax, 0xffffffff
pop edi
pop esi
mov ecx, dword [esp + 0x104]
xor ecx, esp
call fcn.100ca320
mov esp, ebp
pop ebp
ret
cmp dword [esi + 0x28], 0
je 0x10025c9e
push str.PASV_r_n
lea edx, [esp + 0x44]
push 0xc8
push edx
call dword [sym.imp.MSVCR90.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 0x10025af0
mov ecx, dword [esi + 0x2c]
push 0
sub eax, edx
push eax
lea eax, [esp + 0x48]
push eax
push ecx
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jge 0x10025b48
push str.send_failed
push 9
xor eax, eax
call fcn.10071a30
mov edx, dword [esi + 0x30]
add esp, 8
push edx
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [esi + 0x30], 0xffffffff
or eax, 0xffffffff
pop edi
pop esi
mov ecx, dword [esp + 0x104]
xor ecx, esp
call fcn.100ca320
mov esp, ebp
pop ebp
ret
mov eax, esi
call fcn.10024e40
mov edi, dword [sym.imp.WS2_32.dll_closesocket]
cmp eax, 2
je 0x10025b77
cmp eax, 5
je 0x10025d36
mov ecx, dword [esi + 0x30]
push ecx
call edi
mov dword [esi + 0x30], 0xffffffff
mov dword [esi + 0x28], 0
mov edx, dword [esi + 0x448]
lea ecx, [edx + esi + 0x3c]
mov al, byte [ecx]
cmp al, 0x30
jl 0x10025b8b
cmp al, 0x39
jle 0x10025b92
test al, al
je 0x10025b92
inc ecx
jmp 0x10025b81
lea eax, [esp + 0x24]
push eax
lea edx, [esp + 0x24]
push edx
lea eax, [esp + 0x24]
push eax
lea edx, [esp + 0x24]
push edx
lea eax, [esp + 0x24]
push eax
lea edx, [esp + 0x24]
push edx
push str._u__u__u__u__u__u
push ecx
call dword [sym.imp.MSVCR90.dll_sscanf]
add esp, 0x20
cmp eax, 6
je 0x10025c09
mov eax, dword [str.Unknown_IO_error]
push str.Invalid_answer_to_PASV_n
push eax
push 0
push 0x7d0
push 9
call sym.libxml2.dll___xmlSimpleError
mov eax, dword [esi + 0x30]
add esp, 0x14
cmp eax, 0xffffffff
je 0x10025bf2
push eax
call edi
mov dword [esi + 0x30], 0xffffffff
or eax, 0xffffffff
pop edi
pop esi
mov ecx, dword [esp + 0x104]
xor ecx, esp
call fcn.100ca320
mov esp, ebp
pop ebp
ret
movzx ecx, byte [esp + 0x10]
movzx eax, byte [esp + 0x18]
movzx edx, byte [esp + 0x14]
mov byte [esp + 0x38], cl
movzx ecx, byte [esp + 0x1c]
mov byte [esp + 0x39], dl
movzx edx, byte [esp + 0x20]
mov byte [esp + 0x3a], al
movzx eax, byte [esp + 0x24]
mov byte [esp + 0x3b], cl
mov ecx, dword [esp + 0x38]
mov byte [esp + 0x3d], al
mov eax, dword [esp + 0xc]
mov byte [esp + 0x3c], dl
mov dx, word [esp + 0x3c]
mov dword [esp + 0x2c], ecx
push eax
lea ecx, [esp + 0x2c]
mov word [esp + 0x2e], dx
mov edx, dword [esi + 0x30]
push ecx
push edx
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
jge 0x10025de3
push str.Failed_to_create_a_data_connection
push 9
xor eax, eax
call fcn.10071a30
mov eax, dword [esi + 0x30]
add esp, 8
push eax
call edi
or eax, 0xffffffff
mov dword [esi + 0x30], eax
pop edi
pop esi
mov ecx, dword [esp + 0x104]
xor ecx, esp
call fcn.100ca320
mov esp, ebp
pop ebp
ret
mov edi, dword [sym.imp.WS2_32.dll_getsockname]
lea ecx, [esp + 0xc]
push ecx
lea edx, [esp + 0x2c]
push edx
push eax
call edi
mov ecx, dword [esp + 0xc]
xor eax, eax
push ecx
lea edx, [esp + 0x2c]
mov word [esp + 0x2e], ax
mov eax, dword [esi + 0x30]
push edx
push eax
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
jge 0x10025d05
push str.bind_failed
push 9
xor eax, eax
call fcn.10071a30
mov ecx, dword [esi + 0x30]
add esp, 8
push ecx
call dword [sym.imp.WS2_32.dll_closesocket]
or eax, 0xffffffff
mov dword [esi + 0x30], eax
pop edi
pop esi
mov ecx, dword [esp + 0x104]
xor ecx, esp
call fcn.100ca320
mov esp, ebp
pop ebp
ret
mov ecx, dword [esi + 0x30]
lea edx, [esp + 0xc]
push edx
lea eax, [esp + 0x2c]
push eax
push ecx
call edi
mov edx, dword [esi + 0x30]
push 1
push edx
call dword [sym.imp.WS2_32.dll_listen]
test eax, eax
jge 0x10025d5a
push str.listen_failed
push 9
xor eax, eax
call fcn.10071a30
add esp, 8
mov eax, dword [esi + 0x30]
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
or eax, 0xffffffff
mov dword [esi + 0x30], eax
pop edi
pop esi
mov ecx, dword [esp + 0x104]
xor ecx, esp
call fcn.100ca320
mov esp, ebp
pop ebp
ret
movzx ecx, byte [esp + 0x2b]
movzx edx, byte [esp + 0x2a]
movzx eax, byte [esp + 0x2f]
push ecx
movzx ecx, byte [esp + 0x32]
push edx
movzx edx, byte [esp + 0x35]
push eax
movzx eax, byte [esp + 0x38]
push ecx
push edx
push eax
push str.PORT__d__d__d__d__d__d_r_n
lea ecx, [esp + 0x5c]
push 0xc8
push ecx
call dword [sym.imp.MSVCR90.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 0x10025da5
sub eax, edx
push 0
push eax
mov eax, dword [esi + 0x2c]
lea edx, [esp + 0x48]
push edx
push eax
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jge 0x10025dce
push str.send_failed
jmp 0x10025cd5
mov eax, esi
call fcn.10024e40
cmp eax, 2
je 0x10025de3
mov edx, dword [esi + 0x30]
push edx
jmp 0x10025ce5
mov eax, dword [esi + 0x30]
mov ecx, dword [esp + 0x10c]
pop edi
pop esi
xor ecx, esp
call fcn.100ca320
mov esp, ebp
pop ebp
ret