Function at 0x4051d0
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
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
mov eax, dword [0x430034]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x14]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
push 6
push 1
mov esi, edx
mov dword [ebp - 0x34], ecx
push 2
mov dword [ebp - 8], esi
mov dword [ebp - 0x30], eax
mov byte [ebp - 0x25], 0
call dword [sym.imp.WS2_32.dll_socket]
mov ecx, eax
mov eax, 2
mov dword [ebp - 0x2c], ecx
test ecx, ecx
je 0x405267
xorps xmm0, xmm0
movups xmmword [ebp - 0x1c], xmm0
mov word [ebp - 0x1c], ax
mov ax, word [ebp + 8]
rol ax, 8
cmp byte [ebp + 0x10], 0
mov word [ebp - 0x1a], ax
push esi
je 0x405238
call dword [sym.imp.WS2_32.dll_inet_addr]
jmp 0x405249
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
je 0x40527b
mov eax, dword [eax + 0xc]
mov eax, dword [eax]
mov eax, dword [eax]
mov esi, dword [ebp - 0x2c]
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x1c]
push 0x10
push eax
push esi
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
jns 0x405280
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
mov al, byte [ebp - 0x25]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040e688
mov esp, ebp
pop ebp
ret
mov esi, dword [ebp - 0x2c]
jmp 0x405260
mov ecx, esi
test ecx, ecx
je 0x405267
xor esi, esi
test ebx, ebx
je 0x4052c3
cmp byte [ebx], 0
je 0x405298
inc esi
cmp byte [ebx + esi], 0
jne 0x405291
xor edi, edi
test esi, esi
je 0x4052c3
nop
push 0
mov eax, esi
sub eax, edi
push eax
lea eax, [ebx + edi]
push eax
push ecx
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
je 0x4052c0
mov ecx, dword [ebp - 0x2c]
add edi, eax
cmp edi, esi
jne 0x4052a0
mov ecx, dword [ebp - 0x2c]
mov edx, dword [ebp - 8]
lea eax, [ebp - 0x38]
push eax
lea eax, [ebp - 0x20]
mov dword [ebp - 0x24], 0
push eax
lea eax, [ebp - 0x24]
mov dword [ebp - 0x20], 0
push eax
push dword [ebp + 8]
mov dword [ebp - 0x38], 0
call fcn.0040a640
cmp eax, 0xc8
jne 0x40538d
mov edi, dword [ebp - 0x38]
test edi, edi
je 0x40538d
mov edx, dword [ebp - 0x34]
sub esp, 0x10
mov ecx, 2
push dword [sym.imp.ntdll.dll_ZwCreateFile]
push 0x80
call fcn.0040b6c0
mov ebx, eax
test ebx, ebx
je 0x40538d
mov ecx, dword [ebp - 0x20]
xor esi, esi
mov dword [ebp - 0x34], ecx
nop
push 0
push 0
mov eax, edi
xorps xmm0, xmm0
sub eax, esi
movq qword [ebp - 0xc], xmm0
push eax
lea eax, [esi + ecx]
push eax
lea eax, [ebp - 0xc]
push eax
push 0
push 0
push 0
push ebx
call dword [sym.imp.ntdll.dll_NtWriteFile]
cmp eax, 0x103
jne 0x405368
push 0
push 0
push ebx
call dword [sym.imp.ntdll.dll_NtWaitForSingleObject]
test eax, eax
js 0x405376
add esi, dword [ebp - 8]
mov ecx, dword [ebp - 0x34]
cmp esi, edi
jne 0x405330
mov esi, dword [ebp - 0x30]
test esi, esi
je 0x405382
mov eax, dword [ebp - 0x20]
mov dword [esi], eax
push ebx
call dword [sym.imp.ntdll.dll_ZwClose]
mov bl, 1
jmp 0x405393
mov bl, byte [ebp - 0x25]
mov esi, dword [ebp - 0x30]
mov eax, dword [ebp - 0x24]
test eax, eax
je 0x4053a3
push eax
call fcn.0041421b
add esp, 4
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x4053b8
cmp dword [esi], 0
jne 0x4053b8
push eax
call fcn.0041421b
add esp, 4
mov esi, dword [ebp - 0x2c]
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
mov ecx, dword [ebp - 4]
mov al, bl
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040e688
mov esp, ebp
pop ebp
ret