Function at 0x10025230
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Resolve dns
Send data
Send data on socket

Disassembly:
sub esp, 0x194
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0x190], eax
push esi
mov esi, dword [esp + 0x19c]
test esi, esi
jne 0x10025269
or eax, 0xffffffff
pop esi
mov ecx, dword [esp + 0x190]
xor ecx, esp
call fcn.100ca320
add esp, 0x194
ret
cmp dword [esi + 4], 0
je 0x10025250
mov ecx, dword [0x1010c244]
push ebp
mov ebp, dword [0x1010c248]
test ecx, ecx
jne 0x10025283
mov ebp, dword [esi + 8]
test ebp, ebp
jne 0x1002528c
mov ebp, 0x15
xor eax, eax
push edi
lea edi, [esi + 0x18]
mov dword [edi], eax
mov dword [edi + 4], eax
mov dword [edi + 8], eax
mov dword [edi + 0xc], eax
test ecx, ecx
je 0x100252a4
push ecx
jmp 0x100252a8
mov eax, dword [esi + 4]
push eax
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
jne 0x100252dc
push str.gethostbyname_failed
push 9
call fcn.10071a30
add esp, 8
pop edi
pop ebp
or eax, 0xffffffff
pop esi
mov ecx, dword [esp + 0x190]
xor ecx, esp
call fcn.100ca320
add esp, 0x194
ret
cmp word [eax + 0xa], 4
jbe 0x1002530f
push str.gethostbyname_address_mismatch
push 9
xor eax, eax
call fcn.10071a30
add esp, 8
pop edi
pop ebp
or eax, 0xffffffff
pop esi
mov ecx, dword [esp + 0x190]
xor ecx, esp
call fcn.100ca320
add esp, 0x194
ret
mov ecx, 2
mov word [edi], cx
movsx edx, word [eax + 0xa]
mov eax, dword [eax + 0xc]
mov ecx, dword [eax]
push ebx
push edx
push ecx
lea edx, [esi + 0x1c]
push edx
call sub.MSVCR90.dll_memcpy
add esp, 0xc
push ebp
call dword [sym.imp.WS2_32.dll_htons]
push 0
push 1
push 2
mov word [esi + 0x1a], ax
call dword [sym.imp.WS2_32.dll_socket]
or ebx, 0xffffffff
mov dword [esi + 0x2c], eax
cmp eax, ebx
jne 0x10025368
push str.socket_failed
push 9
xor eax, eax
call fcn.10071a30
add esp, 8
mov eax, ebx
jmp 0x100256de
push 0x10
push edi
push eax
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
jge 0x1002539b
push str.Failed_to_create_a_connection
push 9
xor eax, eax
call fcn.10071a30
mov eax, dword [esi + 0x2c]
add esp, 8
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [esi + 0x2c], ebx
mov eax, ebx
jmp 0x100256de
mov eax, esi
call fcn.10024e40
cmp eax, 2
je 0x100253bb
mov ecx, dword [esi + 0x2c]
push ecx
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [esi + 0x2c], ebx
mov eax, ebx
jmp 0x100256de
cmp dword [0x1010c244], 0
je 0x10025557
mov eax, dword [0x1010c24c]
mov ebp, dword [sym.imp.MSVCR90.dll__snprintf]
mov ebx, dword [sym.imp.WS2_32.dll_send]
test eax, eax
je 0x100254d4
push eax
push str.USER__s_r_n
lea edx, [esp + 0x18]
push 0x190
push edx
call ebp
lea eax, [esp + 0x20]
add esp, 0x10
mov byte [esp + 0x19f], 0
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10025405
mov ecx, dword [esi + 0x2c]
push 0
sub eax, edx
push eax
lea eax, [esp + 0x18]
push eax
push ecx
call ebx
mov edi, eax
test edi, edi
jl 0x100255ed
mov eax, esi
call fcn.10024e40
sub eax, 1
je 0x100254d4
sub eax, 1
je 0x10025455
sub eax, 1
je 0x10025460
mov eax, dword [esi + 0x2c]
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
or eax, 0xffffffff
mov dword [esi + 0x2c], eax
jmp 0x100256de
mov eax, dword [0x1010c250]
test eax, eax
je 0x100254d4
jmp 0x10025469
mov eax, dword [0x1010c250]
test eax, eax
je 0x10025480
push eax
push str.PASS__s_r_n
lea ecx, [esp + 0x18]
push 0x190
push ecx
call ebp
add esp, 0x10
jmp 0x10025494
push str.PASS_anonymous__r_n
lea edx, [esp + 0x14]
push 0x190
push edx
call ebp
add esp, 0xc
lea eax, [esp + 0x10]
mov byte [esp + 0x19f], 0
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x100254a3
mov ecx, dword [esi + 0x2c]
push 0
sub eax, edx
push eax
lea eax, [esp + 0x18]
push eax
push ecx
call ebx
mov edi, eax
test edi, edi
jl 0x100255ed
mov eax, esi
call fcn.10024e40
cmp eax, 3
jg 0x10025440
mov eax, dword [0x1010c254]
test eax, eax
jl 0x10025713
cmp eax, 1
jle 0x100254f4
cmp eax, 2
je 0x10025588
jmp 0x10025713
mov ecx, dword [esi + 4]
push ecx
push str.SITE__s_r_n
lea edx, [esp + 0x18]
push 0x190
push edx
call ebp
lea eax, [esp + 0x20]
add esp, 0x10
mov byte [esp + 0x19f], 0
lea edx, [eax + 1]
jmp 0x10025520
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10025520
mov ecx, dword [esi + 0x2c]
push 0
sub eax, edx
push eax
lea eax, [esp + 0x18]
push eax
push ecx
call ebx
mov edi, eax
test edi, edi
jl 0x100255ed
mov eax, esi
call fcn.10024e40
cmp eax, 2
jne 0x1002557b
mov dword [0x1010c254], 1
mov ecx, esi
call fcn.10025030
test eax, eax
jge 0x100256f7
mov ecx, dword [esi + 0x2c]
push ecx
call dword [sym.imp.WS2_32.dll_closesocket]
or eax, 0xffffffff
mov dword [esi + 0x2c], eax
jmp 0x100256de
cmp dword [0x1010c254], 1
je 0x10025440
mov eax, dword [esi + 0x10]
mov ecx, dword [esi + 4]
lea edx, [esp + 0x10]
push ecx
test eax, eax
jne 0x100255a9
push str.USER_anonymous__s_r_n
push 0x190
push edx
call ebp
add esp, 0x10
jmp 0x100255ba
push eax
push str.USER__s__s_r_n
push 0x190
push edx
call ebp
add esp, 0x14
lea eax, [esp + 0x10]
mov byte [esp + 0x19f], 0
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x100255d0
mov ecx, dword [esi + 0x2c]
push 0
sub eax, edx
push eax
lea eax, [esp + 0x18]
push eax
push ecx
call ebx
mov edi, eax
test edi, edi
jge 0x10025616
push str.send_failed
push 9
xor eax, eax
call fcn.10071a30
mov edx, dword [esi + 0x2c]
add esp, 8
push edx
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [esi + 0x2c], 0xffffffff
mov eax, edi
jmp 0x100256de
mov eax, esi
call fcn.10024e40
cmp eax, 1
je 0x100256d2
cmp eax, 2
je 0x100256d2
mov eax, dword [esi + 0x14]
test eax, eax
jne 0x1002564c
push str.PASS_anonymous__r_n
lea eax, [esp + 0x14]
push 0x190
push eax
call ebp
add esp, 0xc
jmp 0x10025661
push eax
push str.PASS__s_r_n
lea ecx, [esp + 0x18]
push 0x190
push ecx
call ebp
add esp, 0x10
lea eax, [esp + 0x10]
mov byte [esp + 0x19f], 0
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10025670
sub eax, edx
push 0
push eax
mov eax, dword [esi + 0x2c]
lea edx, [esp + 0x18]
push edx
push eax
call ebx
mov edi, eax
test edi, edi
jge 0x100256b3
push str.send_failed
push 9
xor eax, eax
call fcn.10071a30
mov ecx, dword [esi + 0x2c]
add esp, 8
push ecx
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [esi + 0x2c], 0xffffffff
mov eax, edi
jmp 0x100256de
mov eax, esi
call fcn.10024e40
cmp eax, 1
je 0x100256d2
cmp eax, 2
je 0x100256d2
cmp dword [0x1010c254], 2
jne 0x10025713
jmp 0x10025752
mov dword [0x1010c254], 2
xor eax, eax
mov ecx, dword [esp + 0x1a0]
pop ebx
pop edi
pop ebp
pop esi
xor ecx, esp
call fcn.100ca320
add esp, 0x194
ret
mov eax, esi
call fcn.10024e40
sub eax, 2
je 0x100256dc
sub eax, 1
jne 0x10025752
mov ecx, esi
call fcn.100250e0
test eax, eax
jge 0x10025725
mov eax, dword [esi + 0x2c]
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
or eax, 0xffffffff
mov dword [esi + 0x2c], eax
jmp 0x100256de
mov eax, esi
call fcn.10024e40
sub eax, 2
je 0x100256dc
sub eax, 1
jne 0x10025752
mov ecx, dword [str.Unknown_IO_error]
push str.FTP_server_asking_for_ACCNT_on_anonymous_n
push ecx
push eax
push 0x7d2
push 9
call sym.libxml2.dll___xmlSimpleError
add esp, 0x14
mov edx, dword [esi + 0x2c]
push edx
call dword [sym.imp.WS2_32.dll_closesocket]
or eax, 0xffffffff
mov dword [esi + 0x2c], eax
jmp 0x100256de