Function at 0x140021fd0
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 [0x1401b3d08]
mov rax, qword [rdi + 0x38]
test rax, rax
je 0x1400220bc
cmp byte [rdi + 1], 0
je 0x1400220bc
mov byte [rax + 0x18], 0
mov rbx, qword [rdi + 0x38]
test rbx, rbx
je 0x1400220bc
mov rcx, rbx
call fcn.140042ac0
nop
mov rcx, qword [rbx + 0x80]
test rcx, rcx
je 0x14002204b
mov rax, qword [0x1401b3d08]
test rax, rax
je 0x14002203e
dec dword [rax + 0xf0]
mov rdx, qword [0x1401b3cf8]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
nop
mov rcx, qword [rbx + 0x70]
test rcx, rcx
je 0x140022073
mov rax, qword [0x1401b3d08]
test rax, rax
je 0x140022066
dec dword [rax + 0xf0]
mov rdx, qword [0x1401b3cf8]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
nop
mov rcx, qword [rbx + 0x60]
test rcx, rcx
je 0x14002209b
mov rax, qword [0x1401b3d08]
test rax, rax
je 0x14002208e
dec dword [rax + 0xf0]
mov rdx, qword [0x1401b3cf8]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
nop
mov rax, qword [0x1401b3d08]
test rax, rax
je 0x1400220ad
dec dword [rax + 0xf0]
mov rdx, qword [0x1401b3cf8]
mov rcx, rbx
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
xor r15d, r15d
mov qword [rdi + 0x38], r15
mov rcx, qword [rdi + 0x3c50]
test rcx, rcx
je 0x1400220fb
mov qword [rdi + 0x3c48], r15
mov rax, qword [0x1401b3d08]
test rax, rax
je 0x1400220e8
dec dword [rax + 0xf0]
mov rdx, qword [0x1401b3cf8]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x3c50], r15
cmp byte [rdi], r15b
je 0x140022a76
cmp byte [rdi + 0x5c08], r15b
je 0x14002216c
mov rbx, qword [rdi + 0x20]
test rbx, rbx
je 0x14002216c
mov rax, qword [0x1401b3d08]
mov dword [rax + 0x5c0c], r15d
mov qword [rsp + 0x40], r15
lea rcx, [rsp + 0x40]
call fcn.140035480
mov rsi, rax
lea rdx, [0x140142034]
mov rcx, rbx
call fcn.1400201d0
mov rbx, rax
test rax, rax
je 0x14002216c
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 rbx, qword [rdi + 0x5c58]
movsxd rsi, dword [rdi + 0x5c50]
shl rsi, 5
add rsi, rbx
cmp rbx, rsi
je 0x1400221a1
cmp dword [rbx + 4], 6
jne 0x140022198
mov rax, qword [rbx + 0x10]
mov rdx, rbx
mov rcx, rdi
call rax
add rbx, 0x20
cmp rbx, rsi
jne 0x140022186
mov esi, r15d
cmp dword [rdi + 0x3e78], r15d
jle 0x1400221f7
mov r14, r15
mov rax, qword [rdi + 0x3e80]
mov rbx, qword [r14 + rax]
test rbx, rbx
je 0x1400221e9
mov rcx, rbx
call fcn.140022fc0
mov rax, qword [0x1401b3d08]
test rax, rax
je 0x1400221da
dec dword [rax + 0xf0]
mov rdx, qword [0x1401b3cf8]
mov rcx, rbx
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
inc esi
add r14, 8
cmp esi, dword [rdi + 0x3e78]
jl 0x1400221b0
mov rcx, qword [rdi + 0x3e80]
test rcx, rcx
je 0x14002222f
mov qword [rdi + 0x3e78], r15
mov rax, qword [0x1401b3d08]
test rax, rax
je 0x14002221c
dec dword [rax + 0xf0]
mov rdx, qword [0x1401b3cf8]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x3e80], r15
mov rcx, qword [rdi + 0x3e90]
test rcx, rcx
je 0x140022267
mov qword [rdi + 0x3e88], r15
mov rax, qword [0x1401b3d08]
test rax, rax
je 0x140022254
dec dword [rax + 0xf0]
mov rdx, qword [0x1401b3cf8]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x3e90], r15
mov rcx, qword [rdi + 0x3ea0]
test rcx, rcx
je 0x14002229f
mov qword [rdi + 0x3e98], r15
mov rax, qword [0x1401b3d08]
test rax, rax
je 0x14002228c
dec dword [rax + 0xf0]
mov rdx, qword [0x1401b3cf8]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x3ea0], r15
mov qword [rdi + 0x3ed8], r15
mov rcx, qword [rdi + 0x3eb0]
test rcx, rcx
je 0x1400222de
mov qword [rdi + 0x3ea8], r15
mov rax, qword [0x1401b3d08]
test rax, rax
je 0x1400222cb
dec dword [rax + 0xf0]
mov rdx, qword [0x1401b3cf8]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x3eb0], r15
mov rcx, qword [rdi + 0x3ec0]
test rcx, rcx
je 0x140022316
mov qword [rdi + 0x3eb8], r15
mov rax, qword [0x1401b3d08]
test rax, rax
je 0x140022303
dec dword [rax + 0xf0]
mov rdx, qword [0x1401b3cf8]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x3ec0], r15
mov qword [rdi + 0x48d0], r15
mov qword [rdi + 0x3ee8], r15
mov qword [rdi + 0x3ee0], r15
mov qword [rdi + 0x3f70], r15
mov qword [rdi + 0x3f58], r15
mov qword [rdi + 0x3ef0], r15
lea rcx, [rdi + 0x4610]
call fcn.14001e420
mov rcx, qword [rdi + 0x4830]
test rcx, rcx
je 0x140022384
mov qword [rdi + 0x4828], r15
mov rax, qword [0x1401b3d08]
test rax, rax
je 0x140022371
dec dword [rax + 0xf0]
mov rdx, qword [0x1401b3cf8]
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 0x1400223bc
mov qword [rdi + 0x4838], r15
mov rax, qword [0x1401b3d08]
test rax, rax
je 0x1400223a9
dec dword [rax + 0xf0]
mov rdx, qword [0x1401b3cf8]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4840], r15
mov rcx, qword [rdi + 0x4850]
test rcx, rcx
je 0x1400223f4
mov qword [rdi + 0x4848], r15
mov rax, qword [0x1401b3d08]
test rax, rax
je 0x1400223e1
dec dword [rax + 0xf0]
mov rdx, qword [0x1401b3cf8]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4850], r15
mov rcx, qword [rdi + 0x4890]
test rcx, rcx
je 0x14002242c
mov qword [rdi + 0x4888], r15
mov rax, qword [0x1401b3d08]
test rax, rax
je 0x140022419
dec dword [rax + 0xf0]
mov rdx, qword [0x1401b3cf8]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4890], r15
mov rcx, qword [rdi + 0x48a0]
test rcx, rcx
je 0x140022464
mov qword [rdi + 0x4898], r15
mov rax, qword [0x1401b3d08]
test rax, rax
je 0x140022451
dec dword [rax + 0xf0]
mov rdx, qword [0x1401b3cf8]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x48a0], r15
mov rcx, qword [rdi + 0x48b0]
test rcx, rcx
je 0x14002249c
mov qword [rdi + 0x48a8], r15
mov rax, qword [0x1401b3d08]
test rax, rax
je 0x140022489
dec dword [rax + 0xf0]
mov rdx, qword [0x1401b3cf8]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x48b0], r15
mov ebp, r15d
cmp dword [rdi + 0x48c0], r15d
jle 0x1400225af
mov r14, r15
nop
mov rax, qword [rdi + 0x48c8]
mov rbx, qword [r14 + rax]
test rbx, rbx
je 0x14002259d
mov rsi, qword [rbx + 0x38]
test rsi, rsi
je 0x1400224f6
mov rcx, rsi
call fcn.14001e200
mov rax, qword [0x1401b3d08]
test rax, rax
je 0x1400224e7
dec dword [rax + 0xf0]
mov rdx, qword [0x1401b3cf8]
mov rcx, rsi
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov rsi, qword [rbx + 0x40]
test rsi, rsi
je 0x140022529
mov rcx, rsi
call fcn.14001e200
mov rax, qword [0x1401b3d08]
test rax, rax
je 0x140022519
dec dword [rax + 0xf0]
mov rdx, qword [0x1401b3cf8]
mov rcx, rsi
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
nop
mov rcx, qword [rbx + 0xa0]
test rcx, rcx
je 0x140022554
mov rax, qword [0x1401b3d08]
test rax, rax
je 0x140022547
dec dword [rax + 0xf0]
mov rdx, qword [0x1401b3cf8]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
nop
mov rcx, qword [rbx + 0x60]
test rcx, rcx
je 0x14002257c
mov rax, qword [0x1401b3d08]
test rax, rax
je 0x14002256f
dec dword [rax + 0xf0]
mov rdx, qword [0x1401b3cf8]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
nop
mov rax, qword [0x1401b3d08]
test rax, rax
je 0x14002258e
dec dword [rax + 0xf0]
mov rdx, qword [0x1401b3cf8]
mov rcx, rbx
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
inc ebp
add r14, 8
cmp ebp, dword [rdi + 0x48c0]
jl 0x1400224b0
mov rcx, qword [rdi + 0x48c8]
test rcx, rcx
je 0x1400225e7
mov qword [rdi + 0x48c0], r15
mov rax, qword [0x1401b3d08]
test rax, rax
je 0x1400225d4
dec dword [rax + 0xf0]
mov rdx, qword [0x1401b3cf8]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x48c8], r15
lea rcx, [rdi + 0x4bb8]
call fcn.140036570
mov rcx, qword [rdi + 0x4be8]
test rcx, rcx
je 0x14002262b
mov qword [rdi + 0x4be0], r15
mov rax, qword [0x1401b3d08]
test rax, rax
je 0x140022618
dec dword [rax + 0xf0]
mov rdx, qword [0x1401b3cf8]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4be8], r15
mov rcx, qword [rdi + 0x4bf8]
test rcx, rcx
je 0x140022663
mov qword [rdi + 0x4bf0], r15
mov rax, qword [0x1401b3d08]
test rax, rax
je 0x140022650
dec dword [rax + 0xf0]
mov rdx, qword [0x1401b3cf8]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4bf8], r15
mov ebx, r15d
cmp dword [rdi + 0x4b38], r15d
jle 0x1400226be
mov rsi, r15
nop dword [rax]
nop word [rax + rax]
mov rax, qword [rdi + 0x4b40]
mov rcx, qword [rsi + rax + 0x20]
test rcx, rcx
je 0x1400226b0
mov rax, qword [0x1401b3d08]
test rax, rax
je 0x1400226a3
dec dword [rax + 0xf0]
mov rdx, qword [0x1401b3cf8]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
nop
inc ebx
add rsi, 0x28
cmp ebx, dword [rdi + 0x4b38]
jl 0x140022680
mov rcx, qword [rdi + 0x4b40]
test rcx, rcx
je 0x1400226f6
mov qword [rdi + 0x4b38], r15
mov rax, qword [0x1401b3d08]
test rax, rax
je 0x1400226e3
dec dword [rax + 0xf0]
mov rdx, qword [0x1401b3cf8]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4b40], r15
lea rcx, [rdi + 0x4b68]
call fcn.140036710
mov esi, r15d
cmp dword [rdi + 0x4b58], r15d
jle 0x14002275c
mov rbp, r15
mov rbx, qword [rdi + 0x4b60]
lea rcx, [rbx + 0x10]
add rcx, rbp
call fcn.140042100
nop
mov rcx, qword [rbx + rbp + 0x20]
test rcx, rcx
je 0x14002274e
mov rax, qword [0x1401b3d08]
test rax, rax
je 0x140022741
dec dword [rax + 0xf0]
mov rdx, qword [0x1401b3cf8]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
nop
inc esi
add rbp, 0x70
cmp esi, dword [rdi + 0x4b58]
jl 0x140022711
mov rcx, qword [rdi + 0x4b60]
test rcx, rcx
je 0x140022794
mov qword [rdi + 0x4b58], r15
mov rax, qword [0x1401b3d08]
test rax, rax
je 0x140022781
dec dword [rax + 0xf0]
mov rdx, qword [0x1401b3cf8]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4b60], r15
mov rcx, qword [rdi + 0x4ba8]
test rcx, rcx
je 0x1400227cc
mov qword [rdi + 0x4ba0], r15
mov rax, qword [0x1401b3d08]
test rax, rax
je 0x1400227b9
dec dword [rax + 0xf0]
mov rdx, qword [0x1401b3cf8]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4ba8], r15
mov rcx, qword [rdi + 0x5bd0]
test rcx, rcx
je 0x140022804
mov qword [rdi + 0x5bc8], r15
mov rax, qword [0x1401b3d08]
test rax, rax
je 0x1400227f1
dec dword [rax + 0xf0]
mov rdx, qword [0x1401b3cf8]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x5bd0], r15
mov rcx, qword [rdi + 0x5be0]
test rcx, rcx
je 0x14002283c
mov qword [rdi + 0x5bd8], r15
mov rax, qword [0x1401b3d08]
test rax, rax
je 0x140022829
dec dword [rax + 0xf0]
mov rdx, qword [0x1401b3cf8]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x5be0], r15
mov rcx, qword [rdi + 0x4c48]
test rcx, rcx
je 0x140022874
mov qword [rdi + 0x4c40], r15
mov rax, qword [0x1401b3d08]
test rax, rax
je 0x140022861
dec dword [rax + 0xf0]
mov rdx, qword [0x1401b3cf8]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4c48], r15
mov rcx, qword [rdi + 0x4c58]
test rcx, rcx
je 0x1400228ac
mov qword [rdi + 0x4c50], r15
mov rax, qword [0x1401b3d08]
test rax, rax
je 0x140022899
dec dword [rax + 0xf0]
mov rdx, qword [0x1401b3cf8]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4c58], r15
mov rcx, qword [rdi + 0x4c68]
test rcx, rcx
je 0x1400228e4
mov qword [rdi + 0x4c60], r15
mov rax, qword [0x1401b3d08]
test rax, rax
je 0x1400228d1
dec dword [rax + 0xf0]
mov rdx, qword [0x1401b3cf8]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4c68], r15
mov dword [rdi + 0x5ab8], r15d
mov rcx, qword [rdi + 0x5ac8]
test rcx, rcx
je 0x140022923
mov qword [rdi + 0x5ac0], r15
mov rax, qword [0x1401b3d08]
test rax, rax
je 0x140022910
dec dword [rax + 0xf0]
mov rdx, qword [0x1401b3cf8]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x5ac8], r15
mov rcx, qword [rdi + 0x5c38]
test rcx, rcx
je 0x14002295b
mov qword [rdi + 0x5c30], r15
mov rax, qword [0x1401b3d08]
test rax, rax
je 0x140022948
dec dword [rax + 0xf0]
mov rdx, qword [0x1401b3cf8]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x5c38], r15
mov rcx, qword [rdi + 0x5c28]
test rcx, rcx
je 0x140022993
mov qword [rdi + 0x5c20], r15
mov rax, qword [0x1401b3d08]
test rax, rax
je 0x140022980
dec dword [rax + 0xf0]
mov rdx, qword [0x1401b3cf8]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x5c28], r15
cmp qword [rdi + 0x5cb0], 0
je 0x1400229c4
mov rbx, qword [rdi + 0x5cb0]
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
cmp rbx, rax
je 0x1400229bd
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov qword [rdi + 0x5cb0], r15
mov rcx, qword [rdi + 0x5cc0]
test rcx, rcx
je 0x1400229fc
mov qword [rdi + 0x5cb8], r15
mov rax, qword [0x1401b3d08]
test rax, rax
je 0x1400229e9
dec dword [rax + 0xf0]
mov rdx, qword [0x1401b3cf8]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x5cc0], r15
mov rcx, qword [rdi + 0x5cf8]
test rcx, rcx
je 0x140022a34
mov qword [rdi + 0x5cf0], r15
mov rax, qword [0x1401b3d08]
test rax, rax
je 0x140022a21
dec dword [rax + 0xf0]
mov rdx, qword [0x1401b3cf8]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x5cf8], r15
mov rcx, qword [rdi + 0x5d08]
test rcx, rcx
je 0x140022a6c
mov qword [rdi + 0x5d00], r15
mov rax, qword [0x1401b3d08]
test rax, rax
je 0x140022a59
dec dword [rax + 0xf0]
mov rdx, qword [0x1401b3cf8]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x5d08], r15
mov dword [rdi + 0x5d10], 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