Function at 0x180001db0
Capabilities:
Write file on windows

Disassembly:
push rbx
push rsi
push rdi
push r12
sub rsp, 0x78
mov rax, qword [0x180007008]
xor rax, rsp
mov qword [rsp + 0x60], rax
mov rdi, rcx
test rcx, rcx
je 0x18000231b
cmp byte [rcx + 0xc08], 0
je 0x18000231b
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 0x180001ef6
cmp eax, 2
jne 0x18000231b
lea rbx, [rcx + 0xd08]
cmp byte [rbx], r12b
je 0x18000231b
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 0x180001e73
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 0x180001e73
lea eax, [r12 + 8]
jmp 0x180002320
mov rax, 0xffffffffffffffff
nop word [rax + rax]
inc rax
cmp byte [rbx + rax], r12b
jne 0x180001e80
cmp rax, 8
jbe 0x180001eec
mov rdx, 0xffffffffffffffff
inc rdx
cmp byte [rbx + rdx], r12b
jne 0x180001e96
movsxd rax, edx
cmp byte [rax + rdi + 0xd07], 0x2f
je 0x180001ee2
dec rbx
nop
cmp byte [rbx + 1], r12b
lea rbx, [rbx + 1]
jne 0x180001eb0
lea r8, [0x18000d684]
xor ecx, ecx
nop dword [rax]
nop word [rax + rax]
movzx eax, byte [r8 + rcx]
mov byte [rbx + rcx], al
lea rcx, [rcx + 1]
test al, al
jne 0x180001ed0
inc edx
lea eax, [rdx + 8]
cmp eax, 0x100
jl 0x180001ef6
mov eax, 9
jmp 0x180002320
mov edx, dword [rdi]
lea ecx, [rdx - 1]
cmp ecx, 2
jbe 0x180001f0f
cmp edx, 0xffffffff
je 0x180001f0f
mov eax, 7
jmp 0x180002320
mov eax, dword [rdi + 4]
dec eax
cmp eax, 2
jbe 0x180001f23
mov eax, 0xf
jmp 0x180002320
lea rdx, [rsp + 0x20]
lea rcx, [rdi + 0xc08]
call fcn.180003120
test eax, eax
jne 0x180002320
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 0x180002138
mov eax, dword [rdi]
cmp eax, 1
jne 0x180002100
cmp dword [rsp + 0x3c], 2
je 0x180002114
cmp ecx, 3
jne 0x180002138
cmp byte [rdi + 0x208], r12b
je 0x18000215e
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 0x18000207f
mov edx, dword [rax]
test edx, edx
je 0x18000207f
mov rcx, rbx
call fcn.180003580
cmp eax, 0xffffffff
je 0x18000207f
mov eax, eax
mov ebp, dword [rax + rbx + 0x18]
test ebp, ebp
je 0x18000207f
mov edx, dword [rax + rbx + 0x20]
mov rcx, rbx
call fcn.180003580
movzx r11d, word [rsi + 0x14]
movzx r10d, word [rsi + 6]
add r11, rsi
lea r15, [rbx + rax]
nop dword [rax]
nop dword [rax + rax]
dec ebp
mov r8d, r12d
mov r9d, dword [r15 + rbp*4]
test r10d, r10d
je 0x180002041
lea rdx, [r11 + 0x28]
mov ecx, dword [rdx - 4]
cmp r9d, ecx
jb 0x180002035
add ecx, dword [rdx]
cmp r9d, ecx
jb 0x18000211e
inc r8d
add rdx, 0x28
cmp r8d, r10d
jb 0x180002022
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 0x180002073
inc rcx
test eax, eax
jne 0x180002060
test edx, edx
je 0x18000215e
test ebp, ebp
jne 0x180002010
mov esi, 0xc
mov rcx, qword [rdi + 0x1018]
test rcx, rcx
je 0x18000209d
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 0x1800020b6
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 0x1800020cf
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 0x180002320
cmp eax, 2
jne 0x180001f7d
cmp dword [rsp + 0x3c], 1
jne 0x180001f7d
mov esi, 0xd
jmp 0x180002084
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 0x180002048
cmp ecx, 1
jne 0x180002159
cmp byte [rdi + 0x108], r12b
je 0x18000214f
cmp byte [rdi + 0x208], r12b
jne 0x18000217a
mov esi, 5
jmp 0x180002084
cmp ecx, 3
jne 0x18000217a
cmp byte [rdi + 0x308], r12b
je 0x18000217a
cmp byte [rdi + 0x208], r12b
jne 0x18000217a
mov esi, 0xe
jmp 0x180002084
lea rdx, [rsp + 0x20]
mov rcx, rdi
call fcn.180002a80
mov esi, eax
test eax, eax
jne 0x180002084
mov rcx, rdi
call fcn.180002340
mov esi, eax
test eax, eax
jne 0x180002084
cmp dword [rdi + 0x1020], 2
jne 0x1800021eb
lea rcx, [rdi + 0xf08]
lea rdx, [0x18000d680]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen]
mov rbx, rax
test rax, rax
je 0x1800021eb
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 0x180002201
mov rax, qword [rdi + 0x1028]
add rax, 0x1dda
jmp 0x180002227
cmp eax, 2
jne 0x180002215
mov rax, qword [rdi + 0x1028]
add rax, 0x3fc0
jmp 0x180002227
cmp eax, 3
jne 0x18000222e
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 0x180002252
lea esi, [rax + 6]
jmp 0x180002084
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 0x1800022ae
mov word [rbx + 1], 0x515a
lea rcx, [rbx + 4]
mov byte [rbx + 3], 0x52
mov r8d, 0x1dba
lea rdx, [0x18000b490]
call sub.VCRUNTIME140.dll_memcpy
jmp 0x1800020cf
cmp eax, 2
jne 0x1800022ce
mov r8d, 0x3fa0
lea rdx, [0x1800074f0]
lea rcx, [rbx + 1]
call sub.VCRUNTIME140.dll_memcpy
jmp 0x1800020cf
cmp eax, 3
jne 0x1800020cf
mov dword [rbx + 1], 0xf48c031
lea rdx, [0x1800074f0]
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 0x180002297
mov eax, 0xa
mov rcx, qword [rsp + 0x60]
xor rcx, rsp
call fcn.180001010
add rsp, 0x78
pop r12
pop rdi
pop rsi
pop rbx
ret