Function at 0x1800036e0
Capabilities:
Check http status code
Clear file content
Create directory
Create http request
Download and write a file
Get common file path
Get file size
Get http content length
Read data from internet
Receive and write data from server to client
Receive data
Reference http user-agent string
Write file on windows

Disassembly:
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x40b0]
mov eax, 0x41b0
call fcn.180019b40
sub rsp, rax
mov qword [rsp + 0x40], 0xfffffffffffffffe
mov qword [rsp + 0x41e8], rbx
mov qword [rsp + 0x41f0], rsi
mov qword [rsp + 0x41f8], rdi
movaps xmmword [rsp + 0x41a0], xmm6
mov rax, qword [0x1800677c0]
xor rax, rsp
mov qword [rbp + 0x4090], rax
mov rsi, rcx
mov rax, qword [rcx + 8]
xor ebx, ebx
mov dword [rax + 0x818], ebx
mov rcx, qword [rcx + 8]
test rcx, rcx
jne 0x180003758
xor eax, eax
jmp 0x180003d7a
add rcx, 0x400
call fcn.1800023a0
mov rdi, rax
test rax, rax
je 0x180003751
mov qword [rsp + 0x70], 7
mov qword [rsp + 0x68], rbx
mov word [rsp + 0x58], bx
mov dword [rsp + 0x48], ebx
mov r15d, ebx
cmp word [rax], r15w
jne 0x180003791
mov r8, rbx
jmp 0x18000379f
or r8, 0xffffffffffffffff
inc r8
cmp word [rax + r8*2], r15w
jne 0x180003795
mov rdx, rax
lea rcx, [rsp + 0x58]
call fcn.1800067a0
mov rcx, rdi
call fcn.18001865c
cmp qword [rsp + 0x68], 0xa
jb 0x180003d66
mov rax, qword [rsi + 8]
mov dword [rax + 0x818], 3
mov dword [rsp + 0x20], ebx
xor r9d, r9d
xor r8d, r8d
xor edx, edx
lea rcx, str.Mozilla_5.0__compatible__MSIE_9.0__Windows_NT_6.1__WOW64__Trident_5.0_
call qword [sym.imp.WININET.dll_InternetOpenW]
mov r13, rax
test rax, rax
je 0x180003d3d
nop dword [rax]
nop word [rax + rax]
mov dword [rsp + 0x78], 0xbb8
mov r9d, 4
lea r8, [rsp + 0x78]
lea edx, [r9 - 2]
mov rcx, r13
call qword [sym.imp.WININET.dll_InternetSetOptionW]
lea rdx, [rsp + 0x58]
cmp qword [rsp + 0x70], 8
cmovae rdx, qword [rsp + 0x58]
mov qword [rsp + 0x28], rbx
mov dword [rsp + 0x20], 0x80000000
xor r9d, r9d
xor r8d, r8d
mov rcx, r13
call qword [sym.imp.WININET.dll_InternetOpenUrlW]
mov r12, rax
test rax, rax
je 0x180003d34
xor edx, edx
mov r8d, 0x2000
lea rcx, [rbp + 0x2090]
call fcn.180019cb0
mov dword [rsp + 0x48], 0x1000
mov qword [rsp + 0x20], rbx
lea r9, [rsp + 0x48]
lea r8, [rbp + 0x2090]
mov edx, 0x13
mov rcx, r12
call qword [sym.imp.WININET.dll_HttpQueryInfoW]
test eax, eax
je 0x180003d2b
lea rcx, [rbp + 0x2090]
call fcn.180018628
cmp eax, 0xc8
je 0x180003990
add eax, 0xfffffed3
cmp eax, 1
ja 0x180003d2b
xor edx, edx
mov r8d, 0x2000
lea rcx, [rbp + 0x2090]
call fcn.180019cb0
mov dword [rsp + 0x48], 0x1000
mov qword [rsp + 0x20], rbx
lea r9, [rsp + 0x48]
lea r8, [rbp + 0x2090]
mov edx, 0x21
mov rcx, r12
call qword [sym.imp.WININET.dll_HttpQueryInfoW]
test eax, eax
je 0x180003d2b
mov qword [rsp + 0x68], rbx
lea rax, [rsp + 0x58]
cmp qword [rsp + 0x70], 8
cmovae rax, qword [rsp + 0x58]
mov word [rax], bx
cmp word [rbp + 0x2090], r15w
jne 0x18000392c
mov r8, rbx
jmp 0x18000394a
lea rax, [rbp + 0x2090]
or r8, 0xffffffffffffffff
nop word [rax + rax]
inc r8
cmp word [rax + r8*2], r15w
jne 0x180003940
lea rdx, [rbp + 0x2090]
lea rcx, [rsp + 0x58]
call fcn.1800067a0
mov dword [rsp + 0x48], 0x2000
mov qword [rsp + 0x20], rbx
lea r9, [rsp + 0x48]
lea r8, [rbp + 0x2090]
mov edx, 0x23
mov rcx, r12
call qword [sym.imp.WININET.dll_HttpQueryInfoW]
mov rcx, r12
call qword [sym.imp.WININET.dll_InternetCloseHandle]
jmp 0x180003800
xor edx, edx
mov r8d, 0x800
lea rcx, [rbp + 0x890]
call fcn.180019cb0
lea rdx, [rbp + 0x890]
mov ecx, 0x400
call qword [sym.imp.KERNEL32.dll_GetTempPathW]
lea r8, str.atmp_
mov edx, 0x400
lea rcx, [rbp + 0x890]
call fcn.180018d58
xor edx, edx
lea rcx, [rbp + 0x890]
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov word [rbp + 0x90], bx
xor edx, edx
mov r8d, 0x7fe
lea rcx, [rbp + 0x92]
call fcn.180019cb0
mov rax, qword [rsi + 8]
cmp byte [rax + 0x800], r15b
je 0x180003a3c
lea rcx, [rsp + 0x58]
cmp qword [rsp + 0x70], 8
cmovae rcx, qword [rsp + 0x58]
call qword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
mov r8, rax
mov edx, 0x400
lea rcx, [rbp + 0x90]
call fcn.180018de0
cmp word [rbp + 0x90], r15w
jne 0x180003aa1
jmp 0x180003a83
lea r8, [rbp + 0x890]
mov edx, 0x400
lea rcx, [rbp + 0x90]
call fcn.180018de0
mov rcx, qword [rsi + 8]
call fcn.1800023a0
mov rdi, rax
test rax, rax
je 0x180003a83
mov r8, rax
mov edx, 0x400
lea rcx, [rbp + 0x90]
call fcn.180018d58
mov rcx, rdi
call fcn.18001865c
jmp 0x180003aa1
lea r9, [rbp + 0x90]
xor r8d, r8d
lea rdx, [0x18002c1f0]
lea rcx, [rbp + 0x890]
call qword [sym.imp.KERNEL32.dll_GetTempFileNameW]
lea rcx, [rbp + 0x90]
call fcn.180005e50
test rax, rax
je 0x180003ac5
mov r8, rax
mov edx, 0x400
mov rcx, qword [rsi + 8]
call fcn.1800186f4
jmp 0x180003b23
mov byte [rbp - 0x80], r15b
xor edx, edx
mov r8d, 0x103
lea rcx, [rbp - 0x7f]
call fcn.180019cb0
lea rcx, [rbp + 0x890]
call fcn.180005e50
mov rdi, rax
test rax, rax
je 0x180003b23
mov r8, qword [rsi + 8]
mov edx, 0x104
lea rcx, [rbp - 0x80]
call fcn.1800186f4
mov r8, rdi
mov edx, 0x400
mov rcx, qword [rsi + 8]
call fcn.1800186f4
lea r8, [rbp - 0x80]
mov edx, 0x400
mov rcx, qword [rsi + 8]
call fcn.180018758
mov dword [rsp + 0x4c], ebx
mov rdi, qword [rsi + 8]
mov dword [rsp + 0x50], ebx
mov dword [rsp + 0x48], 4
mov qword [rsp + 0x20], rbx
lea r9, [rsp + 0x48]
lea r8, [rsp + 0x4c]
mov edx, 0x20000005
mov rcx, r12
call qword [sym.imp.WININET.dll_HttpQueryInfoW]
test eax, eax
je 0x180003d2b
mov qword [rsp + 0x30], rbx
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov edx, 0x80000000
lea r8d, [r9 + 1]
lea rcx, [rbp + 0x90]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r14, rax
cmp rax, 0xffffffffffffffff
je 0x180003bb6
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [rsp + 0x50], eax
cmp eax, dword [rsp + 0x4c]
jne 0x180003bb6
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x180003d1d
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [rsp + 0x50], ebx
mov qword [rsp + 0x30], rbx
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 2
xor r9d, r9d
mov edx, 0x40000000
lea r8d, [r9 + 3]
lea rcx, [rbp + 0x90]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r14, rax
cmp rax, 0xffffffffffffffff
je 0x180003d2b
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov rcx, qword [rsi + 8]
mov eax, dword [rsp + 0x4c]
mov dword [rcx + 0x814], eax
mov byte [rbp + 0x1090], r15b
xor edx, edx
mov r8d, 0xfff
lea rcx, [rbp + 0x1091]
call fcn.180019cb0
mov ecx, 0x18
call fcn.180018104
mov r15, rax
xor eax, eax
mov qword [r15], rax
mov qword [r15 + 8], rax
mov qword [r15 + 0x10], rax
mov rax, qword [rsi + 0x10]
mov qword [r15], rax
mov rax, qword [rsi + 8]
mov qword [r15 + 8], rax
mov dword [r15 + 0x10], ebx
lea r9, [rsp + 0x48]
mov r8d, 0x5dc
lea rdx, [rbp + 0x1090]
mov rcx, r12
call qword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x180003d06
movss xmm6, dword [0x18002c418]
mov eax, dword [rsp + 0x48]
test eax, eax
je 0x180003d06
mov ecx, dword [rdi + 0x810]
cmp ecx, dword [rsp + 0x4c]
je 0x180003d06
add eax, ecx
mov dword [rdi + 0x810], eax
xorps xmm1, xmm1
cvtsi2ss xmm1, rax
mulss xmm1, xmm6
mov eax, dword [rsp + 0x4c]
xorps xmm0, xmm0
cvtsi2ss xmm0, rax
divss xmm1, xmm0
cvttss2si eax, xmm1
mov dword [r15 + 0x10], eax
mov qword [rsp + 0x20], rbx
lea r9, [rsp + 0x50]
mov r8d, dword [rsp + 0x48]
lea rdx, [rbp + 0x1090]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_WriteFile]
lea r9, [rsp + 0x48]
mov r8d, 0x5dc
lea rdx, [rbp + 0x1090]
mov rcx, r12
call qword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
jne 0x180003c88
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [r15 + 0x10], 0x64
mov r15d, 1
mov rax, qword [rsi + 8]
mov dword [rax + 0x818], 1
mov rcx, r12
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov rcx, r13
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov rax, qword [rsi + 8]
test rax, rax
je 0x180003d63
mov byte [rax + 0x801], 1
mov rax, qword [rsi + 8]
mov byte [rax + 0x802], 0
mov rax, qword [rsi + 8]
mov qword [rax + 0x808], rbx
mov ebx, r15d
cmp qword [rsp + 0x70], 8
jb 0x180003d78
mov rcx, qword [rsp + 0x58]
call fcn.180017fbc
mov eax, ebx
mov rcx, qword [rbp + 0x4090]
xor rcx, rsp
call fcn.180019ba0
lea r11, [rsp + 0x41b0]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rdi, qword [r11 + 0x48]
movaps xmm6, xmmword [r11 - 0x10]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret