Function at 0x140015ed0
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
push r14
push r15
sub rsp, 0x20
mov rdi, qword [0x14007fc20]
mov rax, qword [rdi + 0x58]
test rax, rax
je 0x140015fbc
cmp byte [rdi + 1], 0
je 0x140015fbc
mov byte [rax + 0x18], 0
mov rbx, qword [rdi + 0x58]
test rbx, rbx
je 0x140015fbc
mov rcx, rbx
call fcn.1400367d0
nop
mov rcx, qword [rbx + 0x80]
test rcx, rcx
je 0x140015f4b
mov rax, qword [0x14007fc20]
test rax, rax
je 0x140015f3e
dec dword [rax + 0xf4]
mov rdx, qword [0x14007fc10]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
nop
mov rcx, qword [rbx + 0x70]
test rcx, rcx
je 0x140015f73
mov rax, qword [0x14007fc20]
test rax, rax
je 0x140015f66
dec dword [rax + 0xf4]
mov rdx, qword [0x14007fc10]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
nop
mov rcx, qword [rbx + 0x60]
test rcx, rcx
je 0x140015f9b
mov rax, qword [0x14007fc20]
test rax, rax
je 0x140015f8e
dec dword [rax + 0xf4]
mov rdx, qword [0x14007fc10]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
nop
mov rax, qword [0x14007fc20]
test rax, rax
je 0x140015fad
dec dword [rax + 0xf4]
mov rdx, qword [0x14007fc10]
mov rcx, rbx
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
xor r15d, r15d
mov qword [rdi + 0x58], r15
mov rcx, qword [rdi + 0x3c48]
test rcx, rcx
je 0x140015ffb
mov qword [rdi + 0x3c40], r15
mov rax, qword [0x14007fc20]
test rax, rax
je 0x140015fe8
dec dword [rax + 0xf4]
mov rdx, qword [0x14007fc10]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x3c48], r15
cmp byte [rdi], r15b
je 0x140016916
cmp byte [rdi + 0x5bc1], r15b
je 0x14001606c
mov rbx, qword [rdi + 0x20]
test rbx, rbx
je 0x14001606c
mov rax, qword [0x14007fc20]
mov dword [rax + 0x5bc4], r15d
mov qword [rsp + 0x40], r15
lea rcx, [rsp + 0x40]
call fcn.140029570
mov rsi, rax
lea rdx, [0x140068974]
mov rcx, rbx
call fcn.140013e90
mov rbx, rax
test rax, rax
je 0x14001606c
mov r9, rax
mov r8, qword [rsp + 0x40]
mov edx, 1
mov rcx, rsi
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 ebx, r15d
cmp dword [rdi + 0x5c08], r15d
jle 0x1400160b0
mov rsi, r15
nop dword [rax + rax]
mov rcx, qword [rdi + 0x5c10]
cmp dword [rsi + rcx + 4], 6
jne 0x1400160a2
mov rax, qword [rsi + rcx + 0x10]
movsxd rdx, ebx
shl rdx, 5
add rdx, rcx
mov rcx, rdi
call rax
inc ebx
add rsi, 0x20
cmp ebx, dword [rdi + 0x5c08]
jl 0x140016080
mov esi, r15d
cmp dword [rdi + 0x3e70], r15d
jle 0x140016107
mov r14, r15
nop
mov rax, qword [rdi + 0x3e78]
mov rbx, qword [r14 + rax]
test rbx, rbx
je 0x1400160f9
mov rcx, rbx
call fcn.140016e20
mov rax, qword [0x14007fc20]
test rax, rax
je 0x1400160ea
dec dword [rax + 0xf4]
mov rdx, qword [0x14007fc10]
mov rcx, rbx
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
inc esi
add r14, 8
cmp esi, dword [rdi + 0x3e70]
jl 0x1400160c0
mov rcx, qword [rdi + 0x3e78]
test rcx, rcx
je 0x14001613f
mov qword [rdi + 0x3e70], r15
mov rax, qword [0x14007fc20]
test rax, rax
je 0x14001612c
dec dword [rax + 0xf4]
mov rdx, qword [0x14007fc10]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x3e78], r15
mov rcx, qword [rdi + 0x3e88]
test rcx, rcx
je 0x140016177
mov qword [rdi + 0x3e80], r15
mov rax, qword [0x14007fc20]
test rax, rax
je 0x140016164
dec dword [rax + 0xf4]
mov rdx, qword [0x14007fc10]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x3e88], r15
mov rcx, qword [rdi + 0x3e98]
test rcx, rcx
je 0x1400161af
mov qword [rdi + 0x3e90], r15
mov rax, qword [0x14007fc20]
test rax, rax
je 0x14001619c
dec dword [rax + 0xf4]
mov rdx, qword [0x14007fc10]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x3e98], r15
mov qword [rdi + 0x3ed0], r15
mov rcx, qword [rdi + 0x3ea8]
test rcx, rcx
je 0x1400161ee
mov qword [rdi + 0x3ea0], r15
mov rax, qword [0x14007fc20]
test rax, rax
je 0x1400161db
dec dword [rax + 0xf4]
mov rdx, qword [0x14007fc10]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x3ea8], r15
mov rcx, qword [rdi + 0x3eb8]
test rcx, rcx
je 0x140016226
mov qword [rdi + 0x3eb0], r15
mov rax, qword [0x14007fc20]
test rax, rax
je 0x140016213
dec dword [rax + 0xf4]
mov rdx, qword [0x14007fc10]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x3eb8], r15
mov qword [rdi + 0x48b0], r15
mov qword [rdi + 0x3ee0], r15
mov qword [rdi + 0x3ed8], r15
mov qword [rdi + 0x3f68], r15
mov qword [rdi + 0x3f50], r15
mov qword [rdi + 0x3ee8], r15
lea rcx, [rdi + 0x4608]
call fcn.140012480
mov rcx, qword [rdi + 0x4820]
test rcx, rcx
je 0x140016294
mov qword [rdi + 0x4818], r15
mov rax, qword [0x14007fc20]
test rax, rax
je 0x140016281
dec dword [rax + 0xf4]
mov rdx, qword [0x14007fc10]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4820], r15
mov rcx, qword [rdi + 0x4830]
test rcx, rcx
je 0x1400162cc
mov qword [rdi + 0x4828], r15
mov rax, qword [0x14007fc20]
test rax, rax
je 0x1400162b9
dec dword [rax + 0xf4]
mov rdx, qword [0x14007fc10]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4830], r15
mov rcx, qword [rdi + 0x4840]
test rcx, rcx
je 0x140016304
mov qword [rdi + 0x4838], r15
mov rax, qword [0x14007fc20]
test rax, rax
je 0x1400162f1
dec dword [rax + 0xf4]
mov rdx, qword [0x14007fc10]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4840], r15
mov rcx, qword [rdi + 0x4880]
test rcx, rcx
je 0x14001633c
mov qword [rdi + 0x4878], r15
mov rax, qword [0x14007fc20]
test rax, rax
je 0x140016329
dec dword [rax + 0xf4]
mov rdx, qword [0x14007fc10]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4880], r15
mov rcx, qword [rdi + 0x4890]
test rcx, rcx
je 0x140016374
mov qword [rdi + 0x4888], r15
mov rax, qword [0x14007fc20]
test rax, rax
je 0x140016361
dec dword [rax + 0xf4]
mov rdx, qword [0x14007fc10]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4890], r15
mov ebp, r15d
cmp dword [rdi + 0x48a0], r15d
jle 0x140016456
mov r14, r15
nop word [rax + rax]
mov rax, qword [rdi + 0x48a8]
mov rbx, qword [r14 + rax]
test rbx, rbx
je 0x140016444
mov rsi, qword [rbx + 0x38]
test rsi, rsi
je 0x1400163d6
mov rcx, rsi
call fcn.140012250
mov rax, qword [0x14007fc20]
test rax, rax
je 0x1400163c7
dec dword [rax + 0xf4]
mov rdx, qword [0x14007fc10]
mov rcx, rsi
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov rsi, qword [rbx + 0x40]
test rsi, rsi
je 0x140016409
mov rcx, rsi
call fcn.140012250
mov rax, qword [0x14007fc20]
test rax, rax
je 0x1400163f9
dec dword [rax + 0xf4]
mov rdx, qword [0x14007fc10]
mov rcx, rsi
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
nop
lea rcx, [rbx + 0x78]
lea r9, [0x14002a640]
mov edx, 0x10
lea r8d, [rdx - 0xe]
call fcn.14006421c
nop
mov rax, qword [0x14007fc20]
test rax, rax
je 0x140016435
dec dword [rax + 0xf4]
mov rdx, qword [0x14007fc10]
mov rcx, rbx
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
inc ebp
add r14, 8
cmp ebp, dword [rdi + 0x48a0]
jl 0x140016390
mov rcx, qword [rdi + 0x48a8]
test rcx, rcx
je 0x14001648e
mov qword [rdi + 0x48a0], r15
mov rax, qword [0x14007fc20]
test rax, rax
je 0x14001647b
dec dword [rax + 0xf4]
mov rdx, qword [0x14007fc10]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x48a8], r15
lea rcx, [rdi + 0x4b80]
call fcn.14002a680
mov rcx, qword [rdi + 0x4bb0]
test rcx, rcx
je 0x1400164d2
mov qword [rdi + 0x4ba8], r15
mov rax, qword [0x14007fc20]
test rax, rax
je 0x1400164bf
dec dword [rax + 0xf4]
mov rdx, qword [0x14007fc10]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4bb0], r15
mov rcx, qword [rdi + 0x4bc0]
test rcx, rcx
je 0x14001650a
mov qword [rdi + 0x4bb8], r15
mov rax, qword [0x14007fc20]
test rax, rax
je 0x1400164f7
dec dword [rax + 0xf4]
mov rdx, qword [0x14007fc10]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4bc0], r15
mov ebx, r15d
cmp dword [rdi + 0x4b00], r15d
jle 0x14001655e
mov rsi, r15
nop dword [rax]
mov rax, qword [rdi + 0x4b08]
mov rcx, qword [rsi + rax + 0x20]
test rcx, rcx
je 0x140016550
mov rax, qword [0x14007fc20]
test rax, rax
je 0x140016543
dec dword [rax + 0xf4]
mov rdx, qword [0x14007fc10]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
nop
inc ebx
add rsi, 0x28
cmp ebx, dword [rdi + 0x4b00]
jl 0x140016520
mov rcx, qword [rdi + 0x4b08]
test rcx, rcx
je 0x140016596
mov qword [rdi + 0x4b00], r15
mov rax, qword [0x14007fc20]
test rax, rax
je 0x140016583
dec dword [rax + 0xf4]
mov rdx, qword [0x14007fc10]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4b08], r15
lea rcx, [rdi + 0x4b30]
call fcn.14002a820
mov esi, r15d
cmp dword [rdi + 0x4b20], r15d
jle 0x1400165fc
mov rbp, r15
mov rbx, qword [rdi + 0x4b28]
lea rcx, [rbx + 0x10]
add rcx, rbp
call fcn.140036180
nop
mov rcx, qword [rbx + rbp + 0x20]
test rcx, rcx
je 0x1400165ee
mov rax, qword [0x14007fc20]
test rax, rax
je 0x1400165e1
dec dword [rax + 0xf4]
mov rdx, qword [0x14007fc10]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
nop
inc esi
add rbp, 0x70
cmp esi, dword [rdi + 0x4b20]
jl 0x1400165b1
mov rcx, qword [rdi + 0x4b28]
test rcx, rcx
je 0x140016634
mov qword [rdi + 0x4b20], r15
mov rax, qword [0x14007fc20]
test rax, rax
je 0x140016621
dec dword [rax + 0xf4]
mov rdx, qword [0x14007fc10]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4b28], r15
mov rcx, qword [rdi + 0x4b70]
test rcx, rcx
je 0x14001666c
mov qword [rdi + 0x4b68], r15
mov rax, qword [0x14007fc20]
test rax, rax
je 0x140016659
dec dword [rax + 0xf4]
mov rdx, qword [0x14007fc10]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4b70], r15
mov rcx, qword [rdi + 0x5b88]
test rcx, rcx
je 0x1400166a4
mov qword [rdi + 0x5b80], r15
mov rax, qword [0x14007fc20]
test rax, rax
je 0x140016691
dec dword [rax + 0xf4]
mov rdx, qword [0x14007fc10]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x5b88], r15
mov rcx, qword [rdi + 0x5b98]
test rcx, rcx
je 0x1400166dc
mov qword [rdi + 0x5b90], r15
mov rax, qword [0x14007fc20]
test rax, rax
je 0x1400166c9
dec dword [rax + 0xf4]
mov rdx, qword [0x14007fc10]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x5b98], r15
mov rcx, qword [rdi + 0x4c00]
test rcx, rcx
je 0x140016714
mov qword [rdi + 0x4bf8], r15
mov rax, qword [0x14007fc20]
test rax, rax
je 0x140016701
dec dword [rax + 0xf4]
mov rdx, qword [0x14007fc10]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4c00], r15
mov rcx, qword [rdi + 0x4c10]
test rcx, rcx
je 0x14001674c
mov qword [rdi + 0x4c08], r15
mov rax, qword [0x14007fc20]
test rax, rax
je 0x140016739
dec dword [rax + 0xf4]
mov rdx, qword [0x14007fc10]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4c10], r15
mov rcx, qword [rdi + 0x4c20]
test rcx, rcx
je 0x140016784
mov qword [rdi + 0x4c18], r15
mov rax, qword [0x14007fc20]
test rax, rax
je 0x140016771
dec dword [rax + 0xf4]
mov rdx, qword [0x14007fc10]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4c20], r15
mov dword [rdi + 0x5a70], r15d
mov rcx, qword [rdi + 0x5a80]
test rcx, rcx
je 0x1400167c3
mov qword [rdi + 0x5a78], r15
mov rax, qword [0x14007fc20]
test rax, rax
je 0x1400167b0
dec dword [rax + 0xf4]
mov rdx, qword [0x14007fc10]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x5a80], r15
mov rcx, qword [rdi + 0x5bf0]
test rcx, rcx
je 0x1400167fb
mov qword [rdi + 0x5be8], r15
mov rax, qword [0x14007fc20]
test rax, rax
je 0x1400167e8
dec dword [rax + 0xf4]
mov rdx, qword [0x14007fc10]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x5bf0], r15
mov rcx, qword [rdi + 0x5be0]
test rcx, rcx
je 0x140016833
mov qword [rdi + 0x5bd8], r15
mov rax, qword [0x14007fc20]
test rax, rax
je 0x140016820
dec dword [rax + 0xf4]
mov rdx, qword [0x14007fc10]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x5be0], r15
cmp qword [rdi + 0x5c60], 0
je 0x140016864
mov rbx, qword [rdi + 0x5c60]
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
cmp rbx, rax
je 0x14001685d
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov qword [rdi + 0x5c60], r15
mov rcx, qword [rdi + 0x5c70]
test rcx, rcx
je 0x14001689c
mov qword [rdi + 0x5c68], r15
mov rax, qword [0x14007fc20]
test rax, rax
je 0x140016889
dec dword [rax + 0xf4]
mov rdx, qword [0x14007fc10]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x5c70], r15
mov rcx, qword [rdi + 0x5ca8]
test rcx, rcx
je 0x1400168d4
mov qword [rdi + 0x5ca0], r15
mov rax, qword [0x14007fc20]
test rax, rax
je 0x1400168c1
dec dword [rax + 0xf4]
mov rdx, qword [0x14007fc10]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x5ca8], r15
mov rcx, qword [rdi + 0x5cb8]
test rcx, rcx
je 0x14001690c
mov qword [rdi + 0x5cb0], r15
mov rax, qword [0x14007fc20]
test rax, rax
je 0x1400168f9
dec dword [rax + 0xf4]
mov rdx, qword [0x14007fc10]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x5cb8], r15
mov dword [rdi + 0x5cc0], r15d
mov byte [rdi], 0
mov rbx, qword [rsp + 0x48]
mov rbp, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x58]
add rsp, 0x20
pop r15
pop r14
pop rdi
ret