Function at 0x180001f80
Capabilities:
Write file on windows

Disassembly:
push rbx
push rsi
push rdi
push r12
sub rsp, 0x78
mov rax, qword [0x180006008]
xor rax, rsp
mov qword [rsp + 0x60], rax
mov rdi, rcx
test rcx, rcx
je 0x1800024cb
cmp byte [rcx + 0xc08], 0
je 0x1800024cb
mov eax, dword [rcx + 0x1020]
xor r12d, r12d
mov qword [rcx + 0x1018], r12
mov qword [rcx + 0x1010], r12
mov qword [rcx + 0x1030], r12
mov qword [rcx + 0x1028], r12
mov qword [rcx + 0x1040], r12
mov qword [rcx + 0x1038], r12
cmp eax, 1
je 0x1800020aa
cmp eax, 2
jne 0x1800024cb
lea rbx, [rcx + 0xd08]
cmp byte [rbx], r12b
je 0x1800024cb
lea r8d, [r12 + 7]
mov rcx, rbx
lea rdx, str.http:__
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__strnicmp]
test eax, eax
je 0x180002043
lea r8d, [r12 + 8]
mov rcx, rbx
lea rdx, str.https:__
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__strnicmp]
test eax, eax
je 0x180002043
lea eax, [r12 + 8]
jmp 0x1800024d0
mov rax, 0xffffffffffffffff
nop word [rax + rax]
inc rax
cmp byte [rbx + rax], r12b
jne 0x180002050
cmp rax, 8
jbe 0x1800020a0
mov rcx, 0xffffffffffffffff
inc rcx
cmp byte [rbx + rcx], r12b
jne 0x180002066
movsxd rax, ecx
cmp byte [rax + rdi + 0xd07], 0x2f
je 0x180002096
dec rbx
nop
cmp byte [rbx + 1], r12b
lea rbx, [rbx + 1]
jne 0x180002080
movzx eax, word [0x180004674]
inc ecx
mov word [rbx], ax
lea eax, [rcx + 8]
cmp eax, 0x100
jl 0x1800020aa
mov eax, 9
jmp 0x1800024d0
mov edx, dword [rdi]
lea ecx, [rdx - 1]
cmp ecx, 2
jbe 0x1800020c3
cmp edx, 0xffffffff
je 0x1800020c3
mov eax, 7
jmp 0x1800024d0
mov eax, dword [rdi + 4]
dec eax
cmp eax, 2
jbe 0x1800020d7
mov eax, 0xf
jmp 0x1800024d0
lea rdx, [rsp + 0x20]
lea rcx, [rdi + 0xc08]
call fcn.180001070
test eax, eax
jne 0x1800024d0
mov ecx, dword [rsp + 0x38]
mov qword [rsp + 0xa8], rbp
mov qword [rsp + 0xb0], r14
mov qword [rsp + 0x70], r15
lea eax, [rcx - 3]
mov dword [rdi + 0x1008], ecx
cmp eax, 1
ja 0x1800022e8
mov eax, dword [rdi]
cmp eax, 1
jne 0x1800022b0
cmp dword [rsp + 0x3c], 2
je 0x1800022c4
cmp ecx, 3
jne 0x1800022e8
cmp byte [rdi + 0x208], r12b
je 0x18000230e
mov rbx, qword [rsp + 0x30]
mov edx, 0x14c
mov eax, 0x78
mov ecx, 0x88
movsxd rsi, dword [rbx + 0x3c]
add rsi, rbx
cmp word [rsi + 4], dx
cmovne eax, ecx
add rax, rsi
je 0x18000222f
mov edx, dword [rax]
test edx, edx
je 0x18000222f
mov rcx, rbx
call section..text
cmp eax, 0xffffffff
je 0x18000222f
mov edx, eax
mov ebp, dword [rdx + rbx + 0x18]
test ebp, ebp
je 0x18000222f
mov edx, dword [rdx + rbx + 0x20]
mov rcx, rbx
call section..text
movzx r11d, word [rsi + 0x14]
movzx r10d, word [rsi + 6]
add r11, rsi
lea r15, [rbx + rax]
nop dword [rax + rax]
lea ecx, [rbp - 1]
mov r8d, r12d
mov r9d, dword [r15 + rcx*4]
mov ebp, ecx
test r10d, r10d
je 0x1800021f4
lea rdx, [r11 + 0x28]
mov ecx, dword [rdx - 4]
cmp r9d, ecx
jb 0x1800021e8
add ecx, dword [rdx]
cmp r9d, ecx
jb 0x1800022ce
inc r8d
add rdx, 0x28
cmp r8d, r10d
jb 0x1800021d5
mov rcx, 0xffffffffffffffff
add rcx, qword [rsp + 0x30]
lea r8, [rdi + 0x208]
sub r8, rcx
nop word [rax + rax]
movzx edx, byte [rcx]
movzx eax, byte [rcx + r8]
sub edx, eax
jne 0x180002223
inc rcx
test eax, eax
jne 0x180002210
test edx, edx
je 0x18000230e
test ebp, ebp
jne 0x1800021c0
mov esi, 0xc
mov rcx, qword [rdi + 0x1018]
test rcx, rcx
je 0x18000224d
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x1018], r12
mov rcx, qword [rdi + 0x1030]
test rcx, rcx
je 0x180002266
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x1030], r12
mov rcx, qword [rdi + 0x1040]
test rcx, rcx
je 0x18000227f
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x1040], r12
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov ecx, dword [rsp + 0x20]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__close]
mov r15, qword [rsp + 0x70]
mov eax, esi
mov r14, qword [rsp + 0xb0]
mov rbp, qword [rsp + 0xa8]
jmp 0x1800024d0
cmp eax, 2
jne 0x180002131
cmp dword [rsp + 0x3c], 1
jne 0x180002131
mov esi, 0xd
jmp 0x180002234
mov eax, r8d
lea rcx, [rax + rax*4]
mov eax, dword [r11 + rcx*8 + 0x2c]
sub eax, dword [r11 + rcx*8 + 0x24]
lea ecx, [r9 + rax]
jmp 0x1800021fb
cmp ecx, 1
jne 0x180002309
cmp byte [rdi + 0x108], r12b
je 0x1800022ff
cmp byte [rdi + 0x208], r12b
jne 0x18000232a
mov esi, 5
jmp 0x180002234
cmp ecx, 3
jne 0x18000232a
cmp byte [rdi + 0x308], r12b
je 0x18000232a
cmp byte [rdi + 0x208], r12b
jne 0x18000232a
mov esi, 0xe
jmp 0x180002234
lea rdx, [rsp + 0x20]
mov rcx, rdi
call fcn.180001580
mov esi, eax
test eax, eax
jne 0x180002234
mov rcx, rdi
call fcn.180001860
mov esi, eax
test eax, eax
jne 0x180002234
cmp dword [rdi + 0x1020], 2
jne 0x18000239b
lea rcx, [rdi + 0xf08]
lea rdx, [0x180004678]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen]
mov rbx, rax
test rax, rax
je 0x18000239b
mov r8, qword [rdi + 0x1010]
lea edx, [rsi + 1]
mov rcx, qword [rdi + 0x1018]
mov r9, rax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov eax, dword [rdi]
cmp eax, 1
jne 0x1800023b1
mov rax, qword [rdi + 0x1028]
add rax, 0x1dda
jmp 0x1800023d7
cmp eax, 2
jne 0x1800023c5
mov rax, qword [rdi + 0x1028]
add rax, 0x3fc0
jmp 0x1800023d7
cmp eax, 3
jne 0x1800023de
mov rax, qword [rdi + 0x1028]
add rax, 0x5d7a
mov qword [rdi + 0x1038], rax
mov rcx, qword [rdi + 0x1038]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov qword [rdi + 0x1040], rax
mov rbx, rax
test rax, rax
jne 0x180002402
lea esi, [rax + 6]
jmp 0x180002234
mov byte [rax], 0xe8
mov eax, dword [rdi + 0x1028]
mov dword [rbx + 1], eax
add rbx, 5
mov r8, qword [rdi + 0x1028]
mov rcx, rbx
mov rdx, qword [rdi + 0x1030]
call sub.VCRUNTIME140.dll_memcpy
add rbx, qword [rdi + 0x1028]
mov byte [rbx], 0x59
mov eax, dword [rdi]
cmp eax, 1
jne 0x18000245e
mov word [rbx + 1], 0x515a
lea rcx, [rbx + 4]
mov byte [rbx + 3], 0x52
mov r8d, 0x1dba
lea rdx, [0x180009fe0]
call sub.VCRUNTIME140.dll_memcpy
jmp 0x18000227f
cmp eax, 2
jne 0x18000247e
mov r8d, 0x3fa0
lea rdx, [0x180006040]
lea rcx, [rbx + 1]
call sub.VCRUNTIME140.dll_memcpy
jmp 0x18000227f
cmp eax, 3
jne 0x18000227f
mov dword [rbx + 1], 0xf48c031
lea rdx, [0x180006040]
mov byte [rbx + 5], 0x88
lea rcx, [rbx + 0xa]
mov r8d, 0x3fa0
mov dword [rbx + 6], 0x3fa0
call sub.VCRUNTIME140.dll_memcpy
lea rcx, [rbx + 0x3fad]
mov word [rbx + 0x3faa], 0x515a
mov byte [rbx + 0x3fac], 0x52
jmp 0x180002447
mov eax, 0xa
mov rcx, qword [rsp + 0x60]
xor rcx, rsp
call fcn.180003040
add rsp, 0x78
pop r12
pop rdi
pop rsi
pop rbx
ret