Function at 0x102f3f30
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 [0x106499c8]
xor eax, esp
mov dword [esp + 0x190], eax
push esi
mov esi, dword [esp + 0x19c]
test esi, esi
jne 0x102f3f69
or eax, 0xffffffff
pop esi
mov ecx, dword [esp + 0x190]
xor ecx, esp
call fcn.10311bec
add esp, 0x194
ret
cmp dword [esi + 4], 0
je 0x102f3f50
mov eax, dword [0x1065f590]
push edi
mov edi, dword [0x1065f594]
test eax, eax
jne 0x102f3f82
mov edi, dword [esi + 8]
push ebx
test edi, edi
lea ebx, [esi + 0x18]
mov ecx, 0x15
xorps xmm0, xmm0
cmove edi, ecx
movq qword [ebx], xmm0
movq qword [ebx + 8], xmm0
test eax, eax
je 0x102f3fa3
push eax
jmp 0x102f3fa6
push dword [esi + 4]
call dword [sym.imp.WS2_32.dll_gethostbyname]
mov ecx, eax
test ecx, ecx
jne 0x102f3fdd
push str.gethostbyname_failed
push eax
push 9
call fcn.10269820
add esp, 0xc
or eax, 0xffffffff
pop ebx
pop edi
pop esi
mov ecx, dword [esp + 0x190]
xor ecx, esp
call fcn.10311bec
add esp, 0x194
ret
cmp word [ecx + 0xa], 4
jbe 0x102f4010
push str.gethostbyname_address_mismatch
push 0
push 9
call fcn.10269820
add esp, 0xc
or eax, 0xffffffff
pop ebx
pop edi
pop esi
mov ecx, dword [esp + 0x190]
xor ecx, esp
call fcn.10311bec
add esp, 0x194
ret
mov eax, 2
mov word [ebx], ax
movsx eax, word [ecx + 0xa]
push eax
mov eax, dword [ecx + 0xc]
push dword [eax]
lea eax, [esi + 0x1c]
push eax
call sub.MSVCR110.dll_memcpy
add esp, 0xc
push edi
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]
mov dword [esi + 0x2c], eax
cmp eax, 0xffffffff
jne 0x102f4079
push str.socket_failed
push 0
push 9
call fcn.10269820
add esp, 0xc
or eax, 0xffffffff
pop ebx
pop edi
pop esi
mov ecx, dword [esp + 0x190]
xor ecx, esp
call fcn.10311bec
add esp, 0x194
ret
push 0x10
push ebx
push eax
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
jns 0x102f40c3
push str.Failed_to_create_a_connection
push 0
push 9
call fcn.10269820
add esp, 0xc
push dword [esi + 0x2c]
call dword [sym.imp.WS2_32.dll_closesocket]
pop ebx
pop edi
mov dword [esi + 0x2c], 0xffffffff
or eax, 0xffffffff
pop esi
mov ecx, dword [esp + 0x190]
xor ecx, esp
call fcn.10311bec
add esp, 0x194
ret
push esi
call fcn.102f59a0
add esp, 4
cmp eax, 2
jne 0x102f4098
cmp dword [0x1065f590], 0
push ebp
je 0x102f4258
mov eax, dword [0x1065f598]
mov edi, dword [sym.imp.MSVCR110.dll__snprintf]
mov ebp, dword [sym.imp.WS2_32.dll_send]
test eax, eax
je 0x102f41d8
push eax
push str.USER__s_r_n
lea eax, [esp + 0x18]
push 0x190
push eax
call edi
lea ecx, [esp + 0x20]
add esp, 0x10
mov byte [esp + 0x19f], 0
lea edx, [ecx + 1]
lea esp, [esp]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x102f4120
push 0
sub ecx, edx
push ecx
lea eax, [esp + 0x18]
push eax
push dword [esi + 0x2c]
call ebp
mov ebx, eax
test ebx, ebx
js 0x102f4331
push esi
call fcn.102f59a0
add esp, 4
dec eax
je 0x102f41d8
dec eax
je 0x102f4179
dec eax
jne 0x102f42b0
mov eax, dword [0x1065f59c]
test eax, eax
jne 0x102f4182
push str.PASS_anonymous__r_n
lea eax, [esp + 0x14]
push 0x190
push eax
call edi
add esp, 0xc
jmp 0x102f4197
mov eax, dword [0x1065f59c]
test eax, eax
je 0x102f41d8
push eax
push str.PASS__s_r_n
lea eax, [esp + 0x18]
push 0x190
push eax
call edi
add esp, 0x10
lea ecx, [esp + 0x10]
mov byte [esp + 0x19f], 0
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x102f41a6
push 0
sub ecx, edx
push ecx
lea eax, [esp + 0x18]
push eax
push dword [esi + 0x2c]
call ebp
mov ebx, eax
test ebx, ebx
js 0x102f4331
push esi
call fcn.102f59a0
add esp, 4
cmp eax, 3
jg 0x102f42b0
mov eax, dword [0x1065f5a0]
test eax, eax
js 0x102f42b0
cmp eax, 1
jle 0x102f41f8
cmp eax, 2
je 0x102f42d1
jmp 0x102f42b0
push dword [esi + 4]
lea eax, [esp + 0x14]
push str.SITE__s_r_n
push 0x190
push eax
call edi
lea ecx, [esp + 0x20]
add esp, 0x10
mov byte [esp + 0x19f], 0
lea edx, [ecx + 1]
mov edi, edi
mov al, byte [ecx]
inc ecx
test al, al
jne 0x102f4220
push 0
sub ecx, edx
push ecx
lea eax, [esp + 0x18]
push eax
push dword [esi + 0x2c]
call ebp
mov ebx, eax
test ebx, ebx
js 0x102f4331
push esi
call fcn.102f59a0
add esp, 4
cmp eax, 2
jne 0x102f42c8
mov dword [0x1065f5a0], 1
push esi
call fcn.102f5dc0
add esp, 4
test eax, eax
js 0x102f42b0
push esi
call fcn.102f59a0
add esp, 4
sub eax, 2
je 0x102f4417
dec eax
jne 0x102f42b0
push esi
call fcn.102f5cf0
add esp, 4
test eax, eax
js 0x102f42b0
push esi
call fcn.102f59a0
add esp, 4
sub eax, 2
je 0x102f4417
dec eax
jne 0x102f42b0
push str.FTP_server_asking_for_ACCNT_on_anonymous_n
push 0x7d2
push 9
call fcn.10269820
add esp, 0xc
push dword [esi + 0x2c]
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [esi + 0x2c], 0xffffffff
or eax, 0xffffffff
jmp 0x102f4419
cmp dword [0x1065f5a0], 1
je 0x102f42b0
mov eax, dword [esi + 0x10]
push dword [esi + 4]
test eax, eax
jne 0x102f42f1
push str.USER_anonymous__s_r_n
lea eax, [esp + 0x18]
push 0x190
push eax
call edi
add esp, 0x10
jmp 0x102f4306
push eax
push str.USER__s__s_r_n
lea eax, [esp + 0x1c]
push 0x190
push eax
call edi
add esp, 0x14
lea ecx, [esp + 0x10]
mov byte [esp + 0x19f], 0
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x102f4315
push 0
sub ecx, edx
push ecx
lea eax, [esp + 0x18]
push eax
push dword [esi + 0x2c]
call ebp
mov ebx, eax
test ebx, ebx
jns 0x102f4359
push str.send_failed
push 0
push 9
call fcn.10269820
add esp, 0xc
push dword [esi + 0x2c]
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [esi + 0x2c], 0xffffffff
mov eax, ebx
jmp 0x102f4419
push esi
call fcn.102f59a0
add esp, 4
cmp eax, 1
je 0x102f440d
cmp eax, 2
je 0x102f440d
mov eax, dword [esi + 0x14]
test eax, eax
jne 0x102f4391
push str.PASS_anonymous__r_n
lea eax, [esp + 0x14]
push 0x190
push eax
call edi
add esp, 0xc
jmp 0x102f43a6
push eax
push str.PASS__s_r_n
lea eax, [esp + 0x18]
push 0x190
push eax
call edi
add esp, 0x10
lea ecx, [esp + 0x10]
mov byte [esp + 0x19f], 0
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x102f43b5
push 0
sub ecx, edx
push ecx
lea eax, [esp + 0x18]
push eax
push dword [esi + 0x2c]
call ebp
mov edi, eax
test edi, edi
jns 0x102f43f6
push str.send_failed
push 0
push 9
call fcn.10269820
add esp, 0xc
push dword [esi + 0x2c]
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [esi + 0x2c], 0xffffffff
mov eax, edi
jmp 0x102f4419
push esi
call fcn.102f59a0
add esp, 4
cmp eax, 1
je 0x102f440d
cmp eax, 2
jne 0x102f42b0
mov dword [0x1065f5a0], 2
xor eax, eax
mov ecx, dword [esp + 0x1a0]
pop ebp
pop ebx
pop edi
pop esi
xor ecx, esp
call fcn.10311bec
add esp, 0x194
ret