Function at 0x140003d9c
Capabilities:
Initialize winhttp library
Prepare http request
Receive http response
Write file on windows

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
mov eax, 0x1af8
call fcn.140050410
sub rsp, rax
mov dword [rsp + 0x20], 0
xor r9d, r9d
xor r8d, r8d
xor edx, edx
lea rcx, [0x1400e30f0]
call qword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov qword [rsp + 0x50], rax
cmp qword [rsp + 0x50], 0
jne 0x140003de4
xor al, al
jmp 0x140004074
mov r8d, 0x68
xor edx, edx
lea rcx, [rsp + 0x80]
call fcn.1400aa110
mov dword [rsp + 0x80], 0x68
lea rax, [rsp + 0xf0]
mov qword [rsp + 0x98], rax
mov dword [rsp + 0xa0], 0x100
lea rax, [rsp + 0x2f0]
mov qword [rsp + 0xc8], rax
mov dword [rsp + 0xd0], 0x400
lea r9, [rsp + 0x80]
xor r8d, r8d
xor edx, edx
mov rcx, qword [rsp + 0x1b00]
call qword [sym.imp.WINHTTP.dll_WinHttpCrackUrl]
xor r9d, r9d
movzx r8d, word [rsp + 0xa4]
lea rdx, [rsp + 0xf0]
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov qword [rsp + 0x60], rax
cmp qword [rsp + 0x60], 0
jne 0x140003e93
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
xor al, al
jmp 0x140004074
cmp dword [rsp + 0x94], 2
jne 0x140003ea7
mov dword [rsp + 0x58], 0x800000
jmp 0x140003eaf
mov dword [rsp + 0x58], 0
mov eax, dword [rsp + 0x58]
mov dword [rsp + 0x30], eax
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
xor r9d, r9d
lea r8, [rsp + 0x2f0]
lea rdx, [0x1400e3118]
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov qword [rsp + 0x48], rax
cmp qword [rsp + 0x48], 0
jne 0x140003f10
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
xor al, al
jmp 0x140004074
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
test eax, eax
je 0x140003f47
mov byte [rsp + 0x41], 1
jmp 0x140003f4c
mov byte [rsp + 0x41], 0
mov al, byte [rsp + 0x41]
mov byte [rsp + 0x40], al
movzx eax, byte [rsp + 0x40]
test eax, eax
je 0x140003f82
xor edx, edx
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
je 0x140003f75
mov byte [rsp + 0x42], 1
jmp 0x140003f7a
mov byte [rsp + 0x42], 0
mov al, byte [rsp + 0x42]
mov byte [rsp + 0x40], al
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 2
xor r9d, r9d
xor r8d, r8d
mov edx, 0x40000000
mov rcx, qword [rsp + 0x1b08]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [rsp + 0x68], rax
cmp qword [rsp + 0x68], 0xffffffffffffffff
jne 0x140003fe9
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
xor al, al
jmp 0x140004074
movzx eax, byte [rsp + 0x40]
test eax, eax
je 0x140004044
lea r9, [rsp + 0x5c]
mov r8d, 0x1000
lea rdx, [rsp + 0xaf0]
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
je 0x140004044
cmp dword [rsp + 0x5c], 0
je 0x140004044
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x70]
mov r8d, dword [rsp + 0x5c]
lea rdx, [rsp + 0xaf0]
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.KERNEL32.dll_WriteFile]
nop
jmp 0x140003fe9
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov al, byte [rsp + 0x40]
add rsp, 0x1af8
ret