Function at 0x14004f730
Capabilities:
Download and write a file
Read data from internet
Receive and write data from server to client
Receive data
Send data
Write file on windows

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x27]
sub rsp, 0xd0
mov rax, qword [0x14006c408]
xor rax, rsp
mov qword [rbp + 0x17], rax
mov rdi, rcx
mov r13, rdx
add rcx, 0x10170
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp byte [rdi + 0x101a0], 0
lea rcx, [rdi + 0x10170]
jne 0x14004fade
inc dword [rdi + 0x1019c]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [r13]
test eax, eax
jne 0x14004faac
movabs rdx, 0x7fffffffffffffff
lea r8d, [rax + 0x16]
nop word [rax + rax]
mov ecx, dword [rdi + 0x20]
cmp ecx, 7
je 0x14004faa8
test ecx, ecx
je 0x14004fa5d
sub ecx, 1
je 0x14004fa0b
sub ecx, 3
je 0x14004f8d3
sub ecx, 1
je 0x14004f8b4
cmp ecx, 1
jne 0x14004fa9c
xorps xmm0, xmm0
mov qword [rbp - 0x65], 0
lea r8d, [rcx + 0xb]
mov dword [rbp - 0x5d], 0
mov rcx, qword [rdi + 0x10]
lea rbx, [rdi + 0x170]
mov r9, rdi
mov qword [rbp - 0x59], rbx
lea rdx, [rbp - 0x79]
mov qword [rbp - 0x4d], 0
movdqu xmmword [rbp - 0x75], xmm0
mov dword [rbp - 0x45], 0
mov dword [rbp - 0x79], gethostname
mov dword [rbp - 0x51], 0xffff
call qword [sym.imp.WININET.dll_InternetReadFileExA]
test eax, eax
jne 0x14004f855
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [r13], eax
cmp eax, 0x3e5
je 0x14004fa8c
mov eax, dword [rbp - 0x51]
test eax, eax
je 0x14004fab5
mov r9, qword [rdi + 0xb8]
mov esi, eax
test r9, r9
je 0x14004f88b
mov r8d, eax
mov edx, 1
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add qword [rdi + 0xc0], rsi
jmp 0x14004fa8c
mov r8, 0xffffffffffffffff
inc r8
cmp byte [rbx + r8], 0
jne 0x14004f892
lea rcx, [rdi + 0x70]
mov rdx, rbx
call fcn.1400506d0
add qword [rdi + 0xc0], rsi
jmp 0x14004fa8c
mov rcx, qword [rdi + 0x10]
xor r9d, r9d
xor edx, edx
mov dword [rdi + 0x20], 6
lea r8d, [r9 + 8]
call qword [sym.imp.WININET.dll_HttpEndRequestA]
jmp 0x14004fa7e
lea rbx, [rdi + 0x14c]
mov dword [rdi + 0x20], 5
mov ecx, dword [rbx]
lea r15, [rdi + 0x150]
mov rax, qword [r15 + 0x10]
xorps xmm0, xmm0
movups xmmword [rbp - 9], xmm0
cmp rax, rcx
jb 0x14004fb22
sub rax, rcx
mov r14, 0xffffffffffffffff
cmp rax, r14
cmovb r14, rax
cmp qword [r15 + 0x18], 0x10
mov rax, r15
jb 0x14004f91c
mov rax, qword [r15]
lea r12, [rax + rcx]
cmp r14, rdx
ja 0x14004fb28
cmp r14, 0x10
jae 0x14004f952
mov r8, r14
mov qword [rbp + 7], r14
mov rdx, r12
mov qword [rbp + reloc.WS2_32.dll_ntohs], 0xf
lea rcx, [rbp - 9]
call sub.VCRUNTIME140.dll_memcpy
mov byte [rbp + r14 - 9], 0
jmp 0x14004f9a1
mov rsi, r14
or rsi, 0xf
cmp rsi, rdx
jbe 0x14004f963
mov rsi, rdx
jmp 0x14004f96b
cmp rsi, 0x16
cmovb rsi, r8
lea rdx, [rsi + 1]
lea rcx, [rbp - 9]
call fcn.140050670
mov r8, r14
mov qword [rbp - 9], rax
mov rdx, r12
mov qword [rbp + 7], r14
mov rcx, rax
mov qword [rbp + 0xf], rsi
mov rbx, rax
call sub.VCRUNTIME140.dll_memcpy
mov byte [rbx + r14], 0
lea rbx, [rdi + 0x14c]
lea rdx, [rbp - 9]
mov rcx, r15
call fcn.14004f100
mov rdx, qword [rbp + 0xf]
cmp rdx, 0x10
jb 0x14004f9e8
mov rcx, qword [rbp - 9]
inc rdx
mov rax, rcx
cmp rdx, 0x1000
jb 0x14004f9e3
mov rcx, qword [rcx - 8]
add rdx, 0x27
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14004fad7
call fcn.140056c78
cmp qword [r15 + 0x18], 0x10
jb 0x14004f9f2
mov r15, qword [r15]
mov r8d, dword [rdi + 0x160]
mov r9, rbx
mov rcx, qword [rdi + 0x10]
mov rdx, r15
call qword [sym.imp.WININET.dll_InternetWriteFile]
jmp 0x14004fa7e
mov eax, dword [rdi + 0x160]
lea rdx, [rbp - 0x41]
mov rcx, qword [rdi + 0x10]
xorps xmm0, xmm0
xorps xmm1, xmm1
mov qword [rbp - 0x1d], 0
xor r9d, r9d
mov qword [rbp - 0x11], 0
xor r8d, r8d
mov dword [rbp - 0x41], gethostname
movdqu xmmword [rbp - 0x3d], xmm0
mov dword [rbp - 0x15], eax
movdqu xmmword [rbp - 0x2d], xmm1
mov dword [rdi + 0x20], 4
mov qword [rsp + 0x20], rdi
call qword [sym.imp.WININET.dll_HttpSendRequestExA]
jmp 0x14004fa7e
mov rcx, qword [rdi + 0x10]
xor r9d, r9d
xor r8d, r8d
mov dword [rdi + 0x20], 6
xor edx, edx
mov dword [rsp + 0x20], 0
call qword [sym.imp.WININET.dll_HttpSendRequestA]
test eax, eax
jne 0x14004fa8c
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [r13], eax
mov r8d, reloc.WS2_32.dll_shutdown
movabs rdx, 0x7fffffffffffffff
mov eax, dword [r13]
test eax, eax
je 0x14004f7b0
test eax, eax
je 0x14004faf3
cmp eax, 0x3e5
je 0x14004faf3
jmp 0x14004faec
mov dword [rdi + 0x20], 7
mov byte [rdi + 0x149], 1
call qword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [rdi + 0x101a4]
mov dword [rdi + 0x101a4], eax
jmp 0x14004faf3
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov dword [r13], 0x3e3
mov byte [rdi + 0x148], 1
mov rcx, rdi
call fcn.140053540
mov rcx, qword [rbp + 0x17]
xor rcx, rsp
call fcn.140056920
mov rbx, qword [rsp + 0x120]
add rsp, 0xd0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
call fcn.140050650
int3
call fcn.140050630
int3