Function at 0x140003470
Capabilities:
Create http request
Download and write a file
Get http content length
Read data from internet
Receive and write data from server to client
Receive data
Write file on windows

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rdx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x1150]
mov eax, 0x1250
call fcn.140093bf0
sub rsp, rax
movaps xmmword [rsp + 0x1240], xmm6
movaps xmmword [rsp + 0x1230], xmm7
movaps xmmword [rsp + 0x1220], xmm8
movaps xmmword [rsp + 0x1210], xmm9
movaps xmmword [rsp + 0x1200], xmm10
movaps xmmword [rsp + 0x11f0], xmm11
movaps xmmword [rsp + 0x11e0], xmm12
movaps xmmword [rsp + 0x11d0], xmm13
movaps xmmword [rsp + 0x11c0], xmm14
mov rdi, rdx
mov r15, rcx
xor r13d, r13d
mov rsi, rdx
lea r14, [rdx + 0x18]
cmp qword [r14], 0xf
jbe 0x140003508
mov rsi, qword [rdx]
lea rbx, [rdx + 0x18]
jmp 0x14000350b
mov rbx, r14
mov r12d, r13d
mov dword [rbp + 0x11a8], r13d
mov dword [rsp + 0x44], 4
mov dword [rsp + 0x20], r13d
xor r9d, r9d
xor r8d, r8d
xor edx, edx
lea rcx, [0x1400b4550]
call qword [sym.imp.WININET.dll_InternetOpenW]
mov qword [rsp + 0x68], rax
test rax, rax
jne 0x1400035e0
mov esi, reloc.WS2_32.dll_inet_ntoa
mov ecx, 0xfffffff5
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
mov rcx, rax
movzx edx, si
call qword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, [0x1400b4570]
call fcn.140001270
mov esi, 7
mov ecx, 0xfffffff5
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
mov rcx, rax
movzx edx, si
call qword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
nop
mov rdx, qword [r14]
cmp rdx, 0xf
jbe 0x1400035ce
inc rdx
mov rcx, qword [rdi]
cmp rdx, 0x1000
jb 0x1400035c6
add rdx, 0x27
mov r8, qword [rcx - 8]
sub rcx, r8
lea rax, [rcx - 8]
cmp rax, 0x1f
ja 0x140003d45
mov rcx, r8
call fcn.140093434
mov r14, rbx
mov qword [rdi + 0x10], r13
mov qword [r14], send
xor al, al
jmp 0x140003cf7
mov qword [rsp + 0x28], r13
mov dword [rsp + 0x20], 0x80000000
xor r9d, r9d
xor r8d, r8d
mov rdx, r15
mov rcx, rax
call qword [sym.imp.WININET.dll_InternetOpenUrlA]
mov r13, rax
test rax, rax
jne 0x1400036e3
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, reloc.WS2_32.dll_inet_ntoa
mov ecx, 0xfffffff5
cmp eax, 0x2f78
jne 0x140003642
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
mov rcx, rax
movzx edx, si
call qword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
lea rcx, [0x1400b4598]
call fcn.140001270
jmp 0x140003668
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
mov rcx, rax
movzx edx, si
call qword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, [0x1400b45b8]
call fcn.140001270
mov esi, 7
mov ecx, 0xfffffff5
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
movzx edx, si
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.WININET.dll_InternetCloseHandle]
nop
mov rdx, qword [rbx]
cmp rdx, 0xf
jbe 0x1400036cd
inc rdx
mov rcx, qword [rdi]
cmp rdx, 0x1000
jb 0x1400036c4
add rdx, 0x27
mov r8, qword [rcx - 8]
sub rcx, r8
lea rax, [rcx - 8]
cmp rax, 0x1f
ja 0x140003d45
mov rcx, r8
call fcn.140093434
lea rbx, [rdi + 0x18]
mov qword [rdi + 0x10], 0
mov qword [rbx], send
xor al, al
jmp 0x140003cf7
xor r14d, r14d
mov qword [rsp + 0x20], r14
lea r9, [rsp + 0x44]
lea r8, [rbp + 0x11a8]
mov edx, 0x20000005
mov rcx, r13
call qword [sym.imp.WININET.dll_HttpQueryInfoW]
mov qword [rsp + 0x30], r14
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 2
xor r9d, r9d
xor r8d, r8d
mov edx, 0x40000000
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov r15, rax
cmp rax, 0xffffffffffffffff
jne 0x140003802
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, reloc.WS2_32.dll_inet_ntoa
mov ecx, 0xfffffff5
cmp eax, 5
jne 0x140003770
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
mov rcx, rax
movzx edx, si
call qword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
lea rcx, [0x1400b45e8]
call fcn.140001270
jmp 0x140003796
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
mov rcx, rax
movzx edx, si
call qword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, [0x1400b4608]
call fcn.140001270
mov esi, 7
mov ecx, 0xfffffff5
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
movzx edx, si
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
nop
mov rdx, qword [rbx]
cmp rdx, 0xf
jbe 0x1400037f0
inc rdx
mov rcx, qword [rdi]
cmp rdx, 0x1000
jb 0x1400037e7
add rdx, 0x27
mov r8, qword [rcx - 8]
sub rcx, r8
lea rax, [rcx - 8]
cmp rax, 0x1f
ja 0x140003d45
mov rcx, r8
call fcn.140093434
lea rbx, [rdi + 0x18]
mov qword [rdi + 0x10], r14
mov qword [rbx], send
xor al, al
jmp 0x140003cf7
call qword [sym.imp.api_ms_win_crt_time_l1_1_0.dll_clock]
mov dword [rsp + 0x40], eax
mov r14, qword [rdi + 0x10]
mov rsi, rdi
cmp qword [rbx], 0xf
jbe 0x14000381c
mov rsi, qword [rdi]
test r14, r14
je 0x1400038e4
xor edx, edx
mov r8d, 0x100
lea rcx, [rbp - 0x40]
call sub.VCRUNTIME140.dll_memset
lea rcx, [0x1400b454c]
lea rdx, [0x1400b454e]
nop dword [rax]
nop dword [rax + rax]
movzx eax, byte [rcx]
mov byte [rbp + rax - 0x40], 1
inc rcx
cmp rcx, rdx
jne 0x140003850
lea rax, [r14 - 1]
mov r8, 0xffffffffffffffff
mov rcx, r8
cmp rax, rcx
cmovb rcx, rax
add rcx, rsi
movzx eax, byte [rcx]
cmp byte [rbp + rax - 0x40], r12b
jne 0x140003894
cmp rcx, rsi
je 0x1400038e4
dec rcx
movzx eax, byte [rcx]
cmp byte [rbp + rax - 0x40], r12b
je 0x140003882
sub rcx, rsi
cmp rcx, r8
je 0x1400038e4
inc rcx
xorps xmm0, xmm0
movups xmmword [rsp + 0x48], xmm0
mov qword [rsp + 0x58], r12
mov qword [rsp + 0x60], r12
mov rax, r14
cmp r14, rcx
jb 0x140003d4c
sub rax, rcx
cmp rax, r8
cmovb r8, rax
mov rax, rdi
cmp qword [rdi + 0x18], 0xf
jbe 0x1400038d4
mov rax, qword [rdi]
lea rdx, [rax + rcx]
lea rcx, [rsp + 0x48]
call fcn.140005370
jmp 0x1400038f2
mov rdx, rdi
lea rcx, [rsp + 0x48]
call fcn.140004540
nop
lea r9, [rbp + 0x11a0]
mov r8d, 0x1000
lea rdx, [rbp + 0xc0]
mov rcx, r13
call qword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x140003c2d
movsd xmm10, qword [0x140d49e30]
movss xmm11, dword [0x140d49f24]
movsd xmm12, qword [0x140d49d28]
xorps xmm13, xmm13
movsd xmm14, qword [0x140d49e18]
mov r14d, dword [rsp + 0x40]
nop dword [rax]
nop dword [rax + rax]
mov r8d, dword [rbp + 0x11a0]
test r8d, r8d
je 0x140003c2d
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x40]
lea rdx, [rbp + 0xc0]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_WriteFile]
add r12d, dword [rbp + 0x11a0]
mov eax, r12d
xorps xmm6, xmm6
cvtsi2sd xmm6, rax
movaps xmm7, xmm6
mulsd xmm7, xmm10
mov eax, dword [rbp + 0x11a8]
xorps xmm0, xmm0
cvtsi2sd xmm0, rax
divsd xmm7, xmm0
call qword [sym.imp.api_ms_win_crt_time_l1_1_0.dll_clock]
sub eax, r14d
movd xmm8, eax
cvtdq2ps xmm8, xmm8
divss xmm8, xmm11
mulsd xmm6, xmm12
comiss xmm8, xmm13
jbe 0x1400039db
cvtps2pd xmm0, xmm8
movaps xmm9, xmm6
divsd xmm9, xmm0
jmp 0x1400039df
xorps xmm9, xmm9
movaps xmm0, xmm7
mulsd xmm0, xmm14
divsd xmm0, xmm10
cvttsd2si esi, xmm0
lea rdx, [0x1400b4640]
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.140004950
mov rbx, rax
mov edx, socket
lea rcx, [rsp + 0x70]
call qword [sym.imp.MSVCP140.dll_struct_std::_Smanip_long_long___int64_____cdecl_std::setw_long_long___int64__]
mov r8, qword [rax]
mov rcx, qword [rbx]
movsxd rcx, dword [rcx + 4]
add rcx, rbx
mov rdx, qword [rax + 8]
call r8
lea rdx, [0x140001c70]
mov rcx, rbx
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::ios_base____ptr64____cdecl___class_std::ios_base____ptr64_____ptr64]
lea rdx, [rsp + 0x48]
cmp qword [rsp + 0x60], 0xf
cmova rdx, qword [rsp + 0x48]
mov r8, qword [rsp + 0x58]
mov rcx, rax
call fcn.140005c40
lea rdx, [0x1400b4638]
mov rcx, rax
call fcn.140004950
lea rdx, [0x140001c50]
mov rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::ios_base____ptr64____cdecl___class_std::ios_base____ptr64_____ptr64]
mov rbx, rax
mov edx, 2
lea rcx, [rbp - 0x80]
call qword [sym.imp.MSVCP140.dll_struct_std::_Smanip_long_long___int64_____cdecl_std::setprecision_long_long___int64__]
mov r8, qword [rax]
mov rcx, qword [rbx]
movsxd rcx, dword [rcx + 4]
add rcx, rbx
mov rdx, qword [rax + 8]
call r8
movaps xmm1, xmm7
mov rcx, rbx
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___double____ptr64]
mov rcx, rax
lea rdx, [0x1400b4630]
call fcn.140004950
xor ebx, ebx
nop word [rax + rax]
cmp ebx, esi
jge 0x140003acd
lea rdx, [0x1400b4644]
jmp 0x140003add
lea rdx, [0x1400b4648]
je 0x140003add
lea rdx, [0x1400b464c]
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.140004950
inc ebx
cmp ebx, 0x32
jl 0x140003ac0
lea rdx, [0x1400b4670]
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.140004950
lea rdx, [0x140001c50]
mov rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::ios_base____ptr64____cdecl___class_std::ios_base____ptr64_____ptr64]
mov rbx, rax
mov edx, 2
lea rcx, [rbp - 0x70]
call qword [sym.imp.MSVCP140.dll_struct_std::_Smanip_long_long___int64_____cdecl_std::setprecision_long_long___int64__]
mov r8, qword [rax]
mov rcx, qword [rbx]
movsxd rcx, dword [rcx + 4]
add rcx, rbx
mov rdx, qword [rax + 8]
call r8
movaps xmm1, xmm9
mov rcx, rbx
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___double____ptr64]
mov rcx, rax
lea rdx, [0x1400b4668]
call fcn.140004950
lea rdx, [0x140001c50]
mov rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::ios_base____ptr64____cdecl___class_std::ios_base____ptr64_____ptr64]
mov rbx, rax
mov edx, 2
lea rcx, [rbp - 0x60]
call qword [sym.imp.MSVCP140.dll_struct_std::_Smanip_long_long___int64_____cdecl_std::setprecision_long_long___int64__]
mov r8, qword [rax]
mov rcx, qword [rbx]
movsxd rcx, dword [rcx + 4]
add rcx, rbx
mov rdx, qword [rax + 8]
call r8
movaps xmm1, xmm6
mov rcx, rbx
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___double____ptr64]
mov rcx, rax
lea rdx, [0x1400b4658]
call fcn.140004950
lea rdx, [0x140001c50]
mov rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::ios_base____ptr64____cdecl___class_std::ios_base____ptr64_____ptr64]
mov rbx, rax
mov edx, 2
lea rcx, [rbp - 0x50]
call qword [sym.imp.MSVCP140.dll_struct_std::_Smanip_long_long___int64_____cdecl_std::setprecision_long_long___int64__]
mov r8, qword [rax]
mov rcx, qword [rbx]
movsxd rcx, dword [rcx + 4]
add rcx, rbx
mov rdx, qword [rax + 8]
call r8
movaps xmm1, xmm8
mov rcx, rbx
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___float____ptr64]
mov rcx, rax
lea rdx, [0x1400b4650]
call fcn.140004950
lea rdx, [0x140005060]
mov rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
lea r9, [rbp + 0x11a0]
mov r8d, 0x1000
lea rdx, [rbp + 0xc0]
mov rcx, r13
call qword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
jne 0x140003950
lea rdx, [0x140004d20]
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, r13
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.WININET.dll_InternetCloseHandle]
nop
mov rdx, qword [rsp + 0x60]
cmp rdx, 0xf
jbe 0x140003c9f
inc rdx
mov rcx, qword [rsp + 0x48]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140003c9a
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140003c9a
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140093434
xor ebx, ebx
mov qword [rsp + 0x58], rbx
mov qword [rsp + 0x60], send
mov byte [rsp + 0x48], bl
mov rdx, qword [rdi + 0x18]
cmp rdx, 0xf
jbe 0x140003ce9
inc rdx
mov rcx, qword [rdi]
cmp rdx, 0x1000
jb 0x140003ce4
add rdx, 0x27
mov r8, qword [rcx - 8]
sub rcx, r8
lea rax, [rcx - 8]
cmp rax, 0x1f
ja 0x140003d45
mov rcx, r8
call fcn.140093434
mov qword [rdi + 0x10], rbx
mov qword [rdi + 0x18], send
mov al, 1
mov byte [rdi], 0
lea r11, [rsp + 0x1250]
mov rbx, qword [r11 + 0x40]
movaps xmm6, xmmword [r11 - 0x10]
movaps xmm7, xmmword [r11 - 0x20]
movaps xmm8, xmmword [r11 - 0x30]
movaps xmm9, xmmword [r11 - 0x40]
movaps xmm10, xmmword [r11 - 0x50]
movaps xmm11, xmmword [r11 - 0x60]
movaps xmm12, xmmword [r11 - 0x70]
movaps xmm13, xmmword [r11 - 0x80]
movaps xmm14, xmmword [r11 - 0x90]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
call fcn.140004840
nop
int3