Function at 0x140013370
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
push rsi
push rdi
push r12
push r14
push r15
sub rsp, 0x20
mov rdi, rcx
mov rax, qword [rcx + 0xa8]
test rax, rax
je 0x1400133ce
cmp byte [rcx + 1], 0
je 0x1400133ce
mov byte [rax + 0x18], 0
mov rbx, qword [rcx + 0xa8]
test rbx, rbx
je 0x1400133ce
mov rcx, rbx
call fcn.1400305d0
mov rax, qword [0x1400f84e0]
test rax, rax
je 0x1400133c5
dec dword [rax + 0x3b4]
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
xor r12d, r12d
mov qword [rdi + 0xa8], r12
cmp byte [rdi], r12b
je 0x140013b0e
cmp byte [rdi + 0x3061], r12b
je 0x140013457
mov rbx, qword [rdi + 0x20]
test rbx, rbx
je 0x140013457
mov rsi, qword [0x1400f84e0]
mov qword [0x1400f84e0], rdi
mov dword [rdi + 0x3064], r12d
mov qword [rsp + 0x50], r12
lea rcx, [rsp + 0x50]
call fcn.140022b40
mov rbp, rax
lea rdx, [0x1400ad698]
mov rcx, rbx
call fcn.14000e270
mov rbx, rax
test rax, rax
je 0x140013450
mov r9, rax
mov r8, qword [rsp + 0x50]
lea edx, [r12 + 1]
mov rcx, rbp
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 qword [0x1400f84e0], rsi
mov ebx, r12d
cmp dword [rdi + 0x30a8], r12d
jle 0x1400134a0
mov rsi, r12
nop word [rax + rax]
mov rcx, qword [rdi + 0x30b0]
cmp dword [rsi + rcx + 4], 6
jne 0x140013492
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 + 0x30a8]
jl 0x140013470
mov esi, r12d
cmp dword [rdi + 0x1bb0], r12d
jle 0x1400134f1
mov r14, r12
nop
mov rax, qword [rdi + 0x1bb8]
mov rbx, qword [r14 + rax]
test rbx, rbx
je 0x1400134e3
mov rcx, rbx
call fcn.1400104d0
mov rax, qword [0x1400f84e0]
test rax, rax
je 0x1400134da
dec dword [rax + 0x3b4]
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
inc esi
add r14, 8
cmp esi, dword [rdi + 0x1bb0]
jl 0x1400134b0
mov rcx, qword [rdi + 0x1bb8]
test rcx, rcx
je 0x140013523
mov qword [rdi + 0x1bb0], r12
mov rax, qword [0x1400f84e0]
test rax, rax
je 0x140013516
dec dword [rax + 0x3b4]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x1bb8], r12
mov rcx, qword [rdi + 0x1bc8]
test rcx, rcx
je 0x140013555
mov qword [rdi + 0x1bc0], r12
mov rax, qword [0x1400f84e0]
test rax, rax
je 0x140013548
dec dword [rax + 0x3b4]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x1bc8], r12
mov rcx, qword [rdi + 0x1bd8]
test rcx, rcx
je 0x140013587
mov qword [rdi + 0x1bd0], r12
mov rax, qword [0x1400f84e0]
test rax, rax
je 0x14001357a
dec dword [rax + 0x3b4]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x1bd8], r12
mov qword [rdi + 0x1c10], r12
mov rcx, qword [rdi + 0x1be8]
test rcx, rcx
je 0x1400135c0
mov qword [rdi + 0x1be0], r12
mov rax, qword [0x1400f84e0]
test rax, rax
je 0x1400135b3
dec dword [rax + 0x3b4]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x1be8], r12
mov rcx, qword [rdi + 0x1bf8]
test rcx, rcx
je 0x1400135f2
mov qword [rdi + 0x1bf0], r12
mov rax, qword [0x1400f84e0]
test rax, rax
je 0x1400135e5
dec dword [rax + 0x3b4]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x1bf8], r12
mov qword [rdi + 0x1dc8], r12
mov qword [rdi + 0x1c20], r12
mov qword [rdi + 0x1c18], r12
mov qword [rdi + 0x1ca0], r12
mov qword [rdi + 0x1c88], r12
mov qword [rdi + 0x1c28], r12
mov rcx, qword [rdi + 0x1d40]
test rcx, rcx
je 0x14001364e
mov qword [rdi + 0x1d38], r12
mov rax, qword [0x1400f84e0]
test rax, rax
je 0x140013641
dec dword [rax + 0x3b4]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x1d40], r12
mov rcx, qword [rdi + 0x1d50]
test rcx, rcx
je 0x140013680
mov qword [rdi + 0x1d48], r12
mov rax, qword [0x1400f84e0]
test rax, rax
je 0x140013673
dec dword [rax + 0x3b4]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x1d50], r12
mov rcx, qword [rdi + 0x1d60]
test rcx, rcx
je 0x1400136b2
mov qword [rdi + 0x1d58], r12
mov rax, qword [0x1400f84e0]
test rax, rax
je 0x1400136a5
dec dword [rax + 0x3b4]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x1d60], r12
mov rcx, qword [rdi + 0x1da0]
test rcx, rcx
je 0x1400136e4
mov qword [rdi + 0x1d98], r12
mov rax, qword [0x1400f84e0]
test rax, rax
je 0x1400136d7
dec dword [rax + 0x3b4]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x1da0], r12
mov rcx, qword [rdi + 0x1db0]
test rcx, rcx
je 0x140013716
mov qword [rdi + 0x1da8], r12
mov rax, qword [0x1400f84e0]
test rax, rax
je 0x140013709
dec dword [rax + 0x3b4]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x1db0], r12
mov ebp, r12d
cmp dword [rdi + 0x1db8], r12d
jle 0x1400137e4
mov r14, r12
nop dword [rax]
mov rax, qword [rdi + 0x1dc0]
mov rbx, qword [r14 + rax]
test rbx, rbx
je 0x1400137d2
mov rsi, qword [rbx + 0x30]
test rsi, rsi
je 0x140013770
mov rcx, rsi
call fcn.14000cb60
mov rax, qword [0x1400f84e0]
test rax, rax
je 0x140013767
dec dword [rax + 0x3b4]
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rsi, qword [rbx + 0x38]
test rsi, rsi
je 0x14001379d
mov rcx, rsi
call fcn.14000cb60
mov rax, qword [0x1400f84e0]
test rax, rax
je 0x140013793
dec dword [rax + 0x3b4]
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
nop
lea rcx, [rbx + 0x70]
lea r9, [0x140023520]
mov edx, 0x10
lea r8d, [rdx - 0xe]
call fcn.140082be4
nop
mov rax, qword [0x1400f84e0]
test rax, rax
je 0x1400137c9
dec dword [rax + 0x3b4]
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
inc ebp
add r14, 8
cmp ebp, dword [rdi + 0x1db8]
jl 0x140013730
mov rcx, qword [rdi + 0x1dc0]
test rcx, rcx
je 0x140013816
mov qword [rdi + 0x1db8], r12
mov rax, qword [0x1400f84e0]
test rax, rax
je 0x140013809
dec dword [rax + 0x3b4]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x1dc0], r12
lea rcx, [rdi + 0x2060]
call fcn.140023650
mov rcx, qword [rdi + 0x2090]
test rcx, rcx
je 0x140013854
mov qword [rdi + 0x2088], r12
mov rax, qword [0x1400f84e0]
test rax, rax
je 0x140013847
dec dword [rax + 0x3b4]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x2090], r12
mov rcx, qword [rdi + 0x20a0]
test rcx, rcx
je 0x140013886
mov qword [rdi + 0x2098], r12
mov rax, qword [0x1400f84e0]
test rax, rax
je 0x140013879
dec dword [rax + 0x3b4]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x20a0], r12
lea rcx, [rdi + 0x2000]
call fcn.1400237d0
mov esi, r12d
cmp dword [rdi + 0x2028], r12d
jle 0x1400138e6
mov rbp, r12
mov rbx, qword [rdi + 0x2030]
lea rcx, [rbx + 0x10]
add rcx, rbp
call fcn.14002fbd0
nop
mov rcx, qword [rbx + rbp + 0x20]
test rcx, rcx
je 0x1400138d8
mov rax, qword [0x1400f84e0]
test rax, rax
je 0x1400138d1
dec dword [rax + 0x3b4]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
nop
inc esi
add rbp, 0x70
cmp esi, dword [rdi + 0x2028]
jl 0x1400138a1
mov rcx, qword [rdi + 0x2030]
test rcx, rcx
je 0x140013918
mov qword [rdi + 0x2028], r12
mov rax, qword [0x1400f84e0]
test rax, rax
je 0x14001390b
dec dword [rax + 0x3b4]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x2030], r12
mov rcx, qword [rdi + 0x2050]
test rcx, rcx
je 0x14001394a
mov qword [rdi + 0x2048], r12
mov rax, qword [0x1400f84e0]
test rax, rax
je 0x14001393d
dec dword [rax + 0x3b4]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x2050], r12
mov rcx, qword [rdi + 0x3038]
test rcx, rcx
je 0x14001397c
mov qword [rdi + 0x3030], r12
mov rax, qword [0x1400f84e0]
test rax, rax
je 0x14001396f
dec dword [rax + 0x3b4]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x3038], r12
mov rcx, qword [rdi + 0x3048]
test rcx, rcx
je 0x1400139ae
mov qword [rdi + 0x3040], r12
mov rax, qword [0x1400f84e0]
test rax, rax
je 0x1400139a1
dec dword [rax + 0x3b4]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x3048], r12
mov rcx, qword [rdi + 0x20c8]
test rcx, rcx
je 0x1400139e0
mov qword [rdi + 0x20c0], r12
mov rax, qword [0x1400f84e0]
test rax, rax
je 0x1400139d3
dec dword [rax + 0x3b4]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x20c8], r12
mov rcx, qword [rdi + 0x20d8]
test rcx, rcx
je 0x140013a12
mov qword [rdi + 0x20d0], r12
mov rax, qword [0x1400f84e0]
test rax, rax
je 0x140013a05
dec dword [rax + 0x3b4]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x20d8], r12
mov rcx, qword [rdi + 0x20e8]
test rcx, rcx
je 0x140013a44
mov qword [rdi + 0x20e0], r12
mov rax, qword [0x1400f84e0]
test rax, rax
je 0x140013a37
dec dword [rax + 0x3b4]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x20e8], r12
mov rcx, qword [rdi + 0x3090]
test rcx, rcx
je 0x140013a76
mov qword [rdi + 0x3088], r12
mov rax, qword [0x1400f84e0]
test rax, rax
je 0x140013a69
dec dword [rax + 0x3b4]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x3090], r12
mov rcx, qword [rdi + 0x3080]
test rcx, rcx
je 0x140013aa8
mov qword [rdi + 0x3078], r12
mov rax, qword [0x1400f84e0]
test rax, rax
je 0x140013a9b
dec dword [rax + 0x3b4]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x3080], r12
cmp qword [rdi + 0x30c8], 0
je 0x140013ad9
mov rbx, qword [rdi + 0x30c8]
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
cmp rbx, rax
je 0x140013ad2
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov qword [rdi + 0x30c8], r12
mov rcx, qword [rdi + 0x30d8]
test rcx, rcx
je 0x140013b0b
mov qword [rdi + 0x30d0], r12
mov rax, qword [0x1400f84e0]
test rax, rax
je 0x140013afe
dec dword [rax + 0x3b4]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x30d8], r12
mov byte [rdi], 0
mov rbx, qword [rsp + 0x58]
mov rbp, qword [rsp + 0x60]
add rsp, 0x20
pop r15
pop r14
pop r12
pop rdi
pop rsi
ret