Function at 0x140005670
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 [0x1400a33e0]
mov rax, qword [rdi + 0x58]
test rax, rax
je 0x14000575c
cmp byte [rdi + 1], 0
je 0x14000575c
mov byte [rax + 0x18], 0
mov rbx, qword [rdi + 0x58]
test rbx, rbx
je 0x14000575c
mov rcx, rbx
call fcn.140027400
nop
mov rcx, qword [rbx + 0x80]
test rcx, rcx
je 0x1400056eb
mov rax, qword [0x1400a33e0]
test rax, rax
je 0x1400056de
dec dword [rax + 0xf4]
mov rdx, qword [0x1400a33d0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
nop
mov rcx, qword [rbx + 0x70]
test rcx, rcx
je 0x140005713
mov rax, qword [0x1400a33e0]
test rax, rax
je 0x140005706
dec dword [rax + 0xf4]
mov rdx, qword [0x1400a33d0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
nop
mov rcx, qword [rbx + 0x60]
test rcx, rcx
je 0x14000573b
mov rax, qword [0x1400a33e0]
test rax, rax
je 0x14000572e
dec dword [rax + 0xf4]
mov rdx, qword [0x1400a33d0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
nop
mov rax, qword [0x1400a33e0]
test rax, rax
je 0x14000574d
dec dword [rax + 0xf4]
mov rdx, qword [0x1400a33d0]
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 0x14000579b
mov qword [rdi + 0x3c40], r15
mov rax, qword [0x1400a33e0]
test rax, rax
je 0x140005788
dec dword [rax + 0xf4]
mov rdx, qword [0x1400a33d0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x3c48], r15
cmp byte [rdi], r15b
je 0x1400060b6
cmp byte [rdi + 0x5be1], r15b
je 0x14000580c
mov rbx, qword [rdi + 0x20]
test rbx, rbx
je 0x14000580c
mov rax, qword [0x1400a33e0]
mov dword [rax + 0x5be4], r15d
mov qword [rsp + 0x40], r15
lea rcx, [rsp + 0x40]
call fcn.140019950
mov rsi, rax
lea rdx, [0x1400606a4]
mov rcx, rbx
call fcn.140003230
mov rbx, rax
test rax, rax
je 0x14000580c
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 + 0x5c28], r15d
jle 0x140005850
mov rsi, r15
nop dword [rax + rax]
mov rcx, qword [rdi + 0x5c30]
cmp dword [rsi + rcx + 4], 6
jne 0x140005842
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 + 0x5c28]
jl 0x140005820
mov esi, r15d
cmp dword [rdi + 0x3e70], r15d
jle 0x1400058a7
mov r14, r15
nop
mov rax, qword [rdi + 0x3e78]
mov rbx, qword [r14 + rax]
test rbx, rbx
je 0x140005899
mov rcx, rbx
call fcn.140006600
mov rax, qword [0x1400a33e0]
test rax, rax
je 0x14000588a
dec dword [rax + 0xf4]
mov rdx, qword [0x1400a33d0]
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 0x140005860
mov rcx, qword [rdi + 0x3e78]
test rcx, rcx
je 0x1400058df
mov qword [rdi + 0x3e70], r15
mov rax, qword [0x1400a33e0]
test rax, rax
je 0x1400058cc
dec dword [rax + 0xf4]
mov rdx, qword [0x1400a33d0]
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 0x140005917
mov qword [rdi + 0x3e80], r15
mov rax, qword [0x1400a33e0]
test rax, rax
je 0x140005904
dec dword [rax + 0xf4]
mov rdx, qword [0x1400a33d0]
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 0x14000594f
mov qword [rdi + 0x3e90], r15
mov rax, qword [0x1400a33e0]
test rax, rax
je 0x14000593c
dec dword [rax + 0xf4]
mov rdx, qword [0x1400a33d0]
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 0x14000598e
mov qword [rdi + 0x3ea0], r15
mov rax, qword [0x1400a33e0]
test rax, rax
je 0x14000597b
dec dword [rax + 0xf4]
mov rdx, qword [0x1400a33d0]
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 0x1400059c6
mov qword [rdi + 0x3eb0], r15
mov rax, qword [0x1400a33e0]
test rax, rax
je 0x1400059b3
dec dword [rax + 0xf4]
mov rdx, qword [0x1400a33d0]
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.140001540
mov rcx, qword [rdi + 0x4820]
test rcx, rcx
je 0x140005a34
mov qword [rdi + 0x4818], r15
mov rax, qword [0x1400a33e0]
test rax, rax
je 0x140005a21
dec dword [rax + 0xf4]
mov rdx, qword [0x1400a33d0]
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 0x140005a6c
mov qword [rdi + 0x4828], r15
mov rax, qword [0x1400a33e0]
test rax, rax
je 0x140005a59
dec dword [rax + 0xf4]
mov rdx, qword [0x1400a33d0]
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 0x140005aa4
mov qword [rdi + 0x4838], r15
mov rax, qword [0x1400a33e0]
test rax, rax
je 0x140005a91
dec dword [rax + 0xf4]
mov rdx, qword [0x1400a33d0]
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 0x140005adc
mov qword [rdi + 0x4878], r15
mov rax, qword [0x1400a33e0]
test rax, rax
je 0x140005ac9
dec dword [rax + 0xf4]
mov rdx, qword [0x1400a33d0]
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 0x140005b14
mov qword [rdi + 0x4888], r15
mov rax, qword [0x1400a33e0]
test rax, rax
je 0x140005b01
dec dword [rax + 0xf4]
mov rdx, qword [0x1400a33d0]
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 0x140005bf6
mov r14, r15
nop word [rax + rax]
mov rax, qword [rdi + 0x48a8]
mov rbx, qword [r14 + rax]
test rbx, rbx
je 0x140005be4
mov rsi, qword [rbx + 0x38]
test rsi, rsi
je 0x140005b76
mov rcx, rsi
call fcn.140001310
mov rax, qword [0x1400a33e0]
test rax, rax
je 0x140005b67
dec dword [rax + 0xf4]
mov rdx, qword [0x1400a33d0]
mov rcx, rsi
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov rsi, qword [rbx + 0x40]
test rsi, rsi
je 0x140005ba9
mov rcx, rsi
call fcn.140001310
mov rax, qword [0x1400a33e0]
test rax, rax
je 0x140005b99
dec dword [rax + 0xf4]
mov rdx, qword [0x1400a33d0]
mov rcx, rsi
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
nop
lea rcx, [rbx + 0x78]
lea r9, [0x14001a970]
mov edx, 0x10
lea r8d, [rdx - 0xe]
call fcn.14005c6fc
nop
mov rax, qword [0x1400a33e0]
test rax, rax
je 0x140005bd5
dec dword [rax + 0xf4]
mov rdx, qword [0x1400a33d0]
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 0x140005b30
mov rcx, qword [rdi + 0x48a8]
test rcx, rcx
je 0x140005c2e
mov qword [rdi + 0x48a0], r15
mov rax, qword [0x1400a33e0]
test rax, rax
je 0x140005c1b
dec dword [rax + 0xf4]
mov rdx, qword [0x1400a33d0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x48a8], r15
lea rcx, [rdi + 0x4ba0]
call fcn.14001a9b0
mov rcx, qword [rdi + 0x4bd0]
test rcx, rcx
je 0x140005c72
mov qword [rdi + 0x4bc8], r15
mov rax, qword [0x1400a33e0]
test rax, rax
je 0x140005c5f
dec dword [rax + 0xf4]
mov rdx, qword [0x1400a33d0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4bd0], r15
mov rcx, qword [rdi + 0x4be0]
test rcx, rcx
je 0x140005caa
mov qword [rdi + 0x4bd8], r15
mov rax, qword [0x1400a33e0]
test rax, rax
je 0x140005c97
dec dword [rax + 0xf4]
mov rdx, qword [0x1400a33d0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4be0], r15
mov ebx, r15d
cmp dword [rdi + 0x4b20], r15d
jle 0x140005cfe
mov rsi, r15
nop dword [rax]
mov rax, qword [rdi + 0x4b28]
mov rcx, qword [rsi + rax + 0x20]
test rcx, rcx
je 0x140005cf0
mov rax, qword [0x1400a33e0]
test rax, rax
je 0x140005ce3
dec dword [rax + 0xf4]
mov rdx, qword [0x1400a33d0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
nop
inc ebx
add rsi, 0x28
cmp ebx, dword [rdi + 0x4b20]
jl 0x140005cc0
mov rcx, qword [rdi + 0x4b28]
test rcx, rcx
je 0x140005d36
mov qword [rdi + 0x4b20], r15
mov rax, qword [0x1400a33e0]
test rax, rax
je 0x140005d23
dec dword [rax + 0xf4]
mov rdx, qword [0x1400a33d0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4b28], r15
lea rcx, [rdi + 0x4b50]
call fcn.14001ab50
mov esi, r15d
cmp dword [rdi + 0x4b40], r15d
jle 0x140005d9c
mov rbp, r15
mov rbx, qword [rdi + 0x4b48]
lea rcx, [rbx + 0x10]
add rcx, rbp
call fcn.140026940
nop
mov rcx, qword [rbx + rbp + 0x20]
test rcx, rcx
je 0x140005d8e
mov rax, qword [0x1400a33e0]
test rax, rax
je 0x140005d81
dec dword [rax + 0xf4]
mov rdx, qword [0x1400a33d0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
nop
inc esi
add rbp, 0x70
cmp esi, dword [rdi + 0x4b40]
jl 0x140005d51
mov rcx, qword [rdi + 0x4b48]
test rcx, rcx
je 0x140005dd4
mov qword [rdi + 0x4b40], r15
mov rax, qword [0x1400a33e0]
test rax, rax
je 0x140005dc1
dec dword [rax + 0xf4]
mov rdx, qword [0x1400a33d0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4b48], r15
mov rcx, qword [rdi + 0x4b90]
test rcx, rcx
je 0x140005e0c
mov qword [rdi + 0x4b88], r15
mov rax, qword [0x1400a33e0]
test rax, rax
je 0x140005df9
dec dword [rax + 0xf4]
mov rdx, qword [0x1400a33d0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4b90], r15
mov rcx, qword [rdi + 0x5ba8]
test rcx, rcx
je 0x140005e44
mov qword [rdi + 0x5ba0], r15
mov rax, qword [0x1400a33e0]
test rax, rax
je 0x140005e31
dec dword [rax + 0xf4]
mov rdx, qword [0x1400a33d0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x5ba8], r15
mov rcx, qword [rdi + 0x5bb8]
test rcx, rcx
je 0x140005e7c
mov qword [rdi + 0x5bb0], r15
mov rax, qword [0x1400a33e0]
test rax, rax
je 0x140005e69
dec dword [rax + 0xf4]
mov rdx, qword [0x1400a33d0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x5bb8], r15
mov rcx, qword [rdi + 0x4c20]
test rcx, rcx
je 0x140005eb4
mov qword [rdi + 0x4c18], r15
mov rax, qword [0x1400a33e0]
test rax, rax
je 0x140005ea1
dec dword [rax + 0xf4]
mov rdx, qword [0x1400a33d0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4c20], r15
mov rcx, qword [rdi + 0x4c30]
test rcx, rcx
je 0x140005eec
mov qword [rdi + 0x4c28], r15
mov rax, qword [0x1400a33e0]
test rax, rax
je 0x140005ed9
dec dword [rax + 0xf4]
mov rdx, qword [0x1400a33d0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4c30], r15
mov rcx, qword [rdi + 0x4c40]
test rcx, rcx
je 0x140005f24
mov qword [rdi + 0x4c38], r15
mov rax, qword [0x1400a33e0]
test rax, rax
je 0x140005f11
dec dword [rax + 0xf4]
mov rdx, qword [0x1400a33d0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4c40], r15
mov dword [rdi + 0x5a90], r15d
mov rcx, qword [rdi + 0x5aa0]
test rcx, rcx
je 0x140005f63
mov qword [rdi + 0x5a98], r15
mov rax, qword [0x1400a33e0]
test rax, rax
je 0x140005f50
dec dword [rax + 0xf4]
mov rdx, qword [0x1400a33d0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x5aa0], r15
mov rcx, qword [rdi + 0x5c10]
test rcx, rcx
je 0x140005f9b
mov qword [rdi + 0x5c08], r15
mov rax, qword [0x1400a33e0]
test rax, rax
je 0x140005f88
dec dword [rax + 0xf4]
mov rdx, qword [0x1400a33d0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x5c10], r15
mov rcx, qword [rdi + 0x5c00]
test rcx, rcx
je 0x140005fd3
mov qword [rdi + 0x5bf8], r15
mov rax, qword [0x1400a33e0]
test rax, rax
je 0x140005fc0
dec dword [rax + 0xf4]
mov rdx, qword [0x1400a33d0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x5c00], r15
cmp qword [rdi + 0x5c80], 0
je 0x140006004
mov rbx, qword [rdi + 0x5c80]
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
cmp rbx, rax
je 0x140005ffd
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov qword [rdi + 0x5c80], r15
mov rcx, qword [rdi + 0x5c90]
test rcx, rcx
je 0x14000603c
mov qword [rdi + 0x5c88], r15
mov rax, qword [0x1400a33e0]
test rax, rax
je 0x140006029
dec dword [rax + 0xf4]
mov rdx, qword [0x1400a33d0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x5c90], r15
mov rcx, qword [rdi + 0x5cc8]
test rcx, rcx
je 0x140006074
mov qword [rdi + 0x5cc0], r15
mov rax, qword [0x1400a33e0]
test rax, rax
je 0x140006061
dec dword [rax + 0xf4]
mov rdx, qword [0x1400a33d0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x5cc8], r15
mov rcx, qword [rdi + 0x5cd8]
test rcx, rcx
je 0x1400060ac
mov qword [rdi + 0x5cd0], r15
mov rax, qword [0x1400a33e0]
test rax, rax
je 0x140006099
dec dword [rax + 0xf4]
mov rdx, qword [0x1400a33d0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x5cd8], r15
mov dword [rdi + 0x5ce0], 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