Function at 0x140012fa0
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, qword [0x1400cd1d8]
mov rax, qword [rdi + 0x38]
test rax, rax
je 0x140012ffc
cmp byte [rdi + 1], 0
je 0x140012ffc
mov byte [rax + 0x18], 0
mov rbx, qword [rdi + 0x38]
test rbx, rbx
je 0x140012ffc
mov rcx, rbx
call fcn.140035d50
mov rax, qword [0x1400cd1d8]
test rax, rax
je 0x140012ff3
dec dword [rax + 0xec]
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
xor r12d, r12d
mov qword [rdi + 0x38], r12
mov rcx, qword [rdi + 0x3c70]
test rcx, rcx
je 0x140013035
mov qword [rdi + 0x3c68], r12
mov rax, qword [0x1400cd1d8]
test rax, rax
je 0x140013028
dec dword [rax + 0xec]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x3c70], r12
cmp byte [rdi], r12b
je 0x1400138a1
cmp byte [rdi + 0x5c29], r12b
je 0x1400130a6
mov rbx, qword [rdi + 0x20]
test rbx, rbx
je 0x1400130a6
mov rax, qword [0x1400cd1d8]
mov dword [rax + 0x5c2c], r12d
mov qword [rsp + 0x50], r12
lea rcx, [rsp + 0x50]
call fcn.140026550
mov rsi, rax
lea rdx, [0x1400c43b4]
mov rcx, rbx
call fcn.1400109d0
mov rbx, rax
test rax, rax
je 0x1400130a6
mov r9, rax
mov r8, qword [rsp + 0x50]
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, r12d
cmp dword [rdi + 0x5c70], r12d
jle 0x1400130f0
mov rsi, r12
nop word [rax + rax]
mov rcx, qword [rdi + 0x5c78]
cmp dword [rsi + rcx + 4], 6
jne 0x1400130e2
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 + 0x5c70]
jl 0x1400130c0
mov esi, r12d
cmp dword [rdi + 0x3ea8], r12d
jle 0x140013141
mov r14, r12
nop
mov rax, qword [rdi + 0x3eb0]
mov rbx, qword [r14 + rax]
test rbx, rbx
je 0x140013133
mov rcx, rbx
call fcn.140013dc0
mov rax, qword [0x1400cd1d8]
test rax, rax
je 0x14001312a
dec dword [rax + 0xec]
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 + 0x3ea8]
jl 0x140013100
mov rcx, qword [rdi + 0x3eb0]
test rcx, rcx
je 0x140013173
mov qword [rdi + 0x3ea8], r12
mov rax, qword [0x1400cd1d8]
test rax, rax
je 0x140013166
dec dword [rax + 0xec]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x3eb0], r12
mov rcx, qword [rdi + 0x3ec0]
test rcx, rcx
je 0x1400131a5
mov qword [rdi + 0x3eb8], r12
mov rax, qword [0x1400cd1d8]
test rax, rax
je 0x140013198
dec dword [rax + 0xec]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x3ec0], r12
mov rcx, qword [rdi + 0x3ed0]
test rcx, rcx
je 0x1400131d7
mov qword [rdi + 0x3ec8], r12
mov rax, qword [0x1400cd1d8]
test rax, rax
je 0x1400131ca
dec dword [rax + 0xec]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x3ed0], r12
mov qword [rdi + 0x3f08], r12
mov rcx, qword [rdi + 0x3ee0]
test rcx, rcx
je 0x140013210
mov qword [rdi + 0x3ed8], r12
mov rax, qword [0x1400cd1d8]
test rax, rax
je 0x140013203
dec dword [rax + 0xec]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x3ee0], r12
mov rcx, qword [rdi + 0x3ef0]
test rcx, rcx
je 0x140013242
mov qword [rdi + 0x3ee8], r12
mov rax, qword [0x1400cd1d8]
test rax, rax
je 0x140013235
dec dword [rax + 0xec]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x3ef0], r12
mov qword [rdi + 0x48f0], r12
mov qword [rdi + 0x3f18], r12
mov qword [rdi + 0x3f10], r12
mov qword [rdi + 0x3fa0], r12
mov qword [rdi + 0x3f88], r12
mov qword [rdi + 0x3f20], r12
lea rcx, [rdi + 0x4640]
call fcn.14000f020
mov rcx, qword [rdi + 0x4860]
test rcx, rcx
je 0x1400132aa
mov qword [rdi + 0x4858], r12
mov rax, qword [0x1400cd1d8]
test rax, rax
je 0x14001329d
dec dword [rax + 0xec]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x4860], r12
mov rcx, qword [rdi + 0x4870]
test rcx, rcx
je 0x1400132dc
mov qword [rdi + 0x4868], r12
mov rax, qword [0x1400cd1d8]
test rax, rax
je 0x1400132cf
dec dword [rax + 0xec]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x4870], r12
mov rcx, qword [rdi + 0x4880]
test rcx, rcx
je 0x14001330e
mov qword [rdi + 0x4878], r12
mov rax, qword [0x1400cd1d8]
test rax, rax
je 0x140013301
dec dword [rax + 0xec]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x4880], r12
mov rcx, qword [rdi + 0x48c0]
test rcx, rcx
je 0x140013340
mov qword [rdi + 0x48b8], r12
mov rax, qword [0x1400cd1d8]
test rax, rax
je 0x140013333
dec dword [rax + 0xec]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x48c0], r12
mov rcx, qword [rdi + 0x48d0]
test rcx, rcx
je 0x140013372
mov qword [rdi + 0x48c8], r12
mov rax, qword [0x1400cd1d8]
test rax, rax
je 0x140013365
dec dword [rax + 0xec]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x48d0], r12
mov ebp, r12d
cmp dword [rdi + 0x48e0], r12d
jle 0x140013446
mov r14, r12
nop word [rax + rax]
mov rax, qword [rdi + 0x48e8]
mov rbx, qword [r14 + rax]
test rbx, rbx
je 0x140013434
mov rsi, qword [rbx + 0x38]
test rsi, rsi
je 0x1400133d0
mov rcx, rsi
call fcn.14000ee30
mov rax, qword [0x1400cd1d8]
test rax, rax
je 0x1400133c7
dec dword [rax + 0xec]
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rsi, qword [rbx + 0x40]
test rsi, rsi
je 0x1400133fd
mov rcx, rsi
call fcn.14000ee30
mov rax, qword [0x1400cd1d8]
test rax, rax
je 0x1400133f3
dec dword [rax + 0xec]
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
nop
lea rcx, [rbx + 0x78]
lea r9, [0x1400276e0]
mov edx, 0x10
mov r8d, 2
call fcn.1400467a4
nop
mov rax, qword [0x1400cd1d8]
test rax, rax
je 0x14001342b
dec dword [rax + 0xec]
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 + 0x48e0]
jl 0x140013390
mov rcx, qword [rdi + 0x48e8]
test rcx, rcx
je 0x140013478
mov qword [rdi + 0x48e0], r12
mov rax, qword [0x1400cd1d8]
test rax, rax
je 0x14001346b
dec dword [rax + 0xec]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x48e8], r12
lea rcx, [rdi + 0x4bd8]
call fcn.140027710
mov rcx, qword [rdi + 0x4c08]
test rcx, rcx
je 0x1400134b6
mov qword [rdi + 0x4c00], r12
mov rax, qword [0x1400cd1d8]
test rax, rax
je 0x1400134a9
dec dword [rax + 0xec]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x4c08], r12
mov rcx, qword [rdi + 0x4c18]
test rcx, rcx
je 0x1400134e8
mov qword [rdi + 0x4c10], r12
mov rax, qword [0x1400cd1d8]
test rax, rax
je 0x1400134db
dec dword [rax + 0xec]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x4c18], r12
mov ebx, r12d
cmp dword [rdi + 0x4b58], r12d
jle 0x140013538
mov rsi, r12
nop word [rax + rax]
mov rax, qword [rdi + 0x4b60]
mov rcx, qword [rsi + rax + 0x20]
test rcx, rcx
je 0x14001352a
mov rax, qword [0x1400cd1d8]
test rax, rax
je 0x140013523
dec dword [rax + 0xec]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
nop
inc ebx
add rsi, 0x28
cmp ebx, dword [rdi + 0x4b58]
jl 0x140013500
mov rcx, qword [rdi + 0x4b60]
test rcx, rcx
je 0x14001356a
mov qword [rdi + 0x4b58], r12
mov rax, qword [0x1400cd1d8]
test rax, rax
je 0x14001355d
dec dword [rax + 0xec]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x4b60], r12
lea rcx, [rdi + 0x4b88]
call fcn.140027890
mov esi, r12d
cmp dword [rdi + 0x4b78], r12d
jle 0x1400135d5
mov rbp, r12
nop word [rax + rax]
mov rbx, qword [rdi + 0x4b80]
lea rcx, [rbx + 0x10]
add rcx, rbp
call fcn.1400357e0
nop
mov rcx, qword [rbx + rbp + 0x20]
test rcx, rcx
je 0x1400135c7
mov rax, qword [0x1400cd1d8]
test rax, rax
je 0x1400135c0
dec dword [rax + 0xec]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
nop
inc esi
add rbp, 0x70
cmp esi, dword [rdi + 0x4b78]
jl 0x140013590
mov rcx, qword [rdi + 0x4b80]
test rcx, rcx
je 0x140013607
mov qword [rdi + 0x4b78], r12
mov rax, qword [0x1400cd1d8]
test rax, rax
je 0x1400135fa
dec dword [rax + 0xec]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x4b80], r12
mov rcx, qword [rdi + 0x4bc8]
test rcx, rcx
je 0x140013639
mov qword [rdi + 0x4bc0], r12
mov rax, qword [0x1400cd1d8]
test rax, rax
je 0x14001362c
dec dword [rax + 0xec]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x4bc8], r12
mov rcx, qword [rdi + 0x5bf0]
test rcx, rcx
je 0x14001366b
mov qword [rdi + 0x5be8], r12
mov rax, qword [0x1400cd1d8]
test rax, rax
je 0x14001365e
dec dword [rax + 0xec]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x5bf0], r12
mov rcx, qword [rdi + 0x5c00]
test rcx, rcx
je 0x14001369d
mov qword [rdi + 0x5bf8], r12
mov rax, qword [0x1400cd1d8]
test rax, rax
je 0x140013690
dec dword [rax + 0xec]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x5c00], r12
mov rcx, qword [rdi + 0x4c68]
test rcx, rcx
je 0x1400136cf
mov qword [rdi + 0x4c60], r12
mov rax, qword [0x1400cd1d8]
test rax, rax
je 0x1400136c2
dec dword [rax + 0xec]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x4c68], r12
mov rcx, qword [rdi + 0x4c78]
test rcx, rcx
je 0x140013701
mov qword [rdi + 0x4c70], r12
mov rax, qword [0x1400cd1d8]
test rax, rax
je 0x1400136f4
dec dword [rax + 0xec]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x4c78], r12
mov rcx, qword [rdi + 0x4c88]
test rcx, rcx
je 0x140013733
mov qword [rdi + 0x4c80], r12
mov rax, qword [0x1400cd1d8]
test rax, rax
je 0x140013726
dec dword [rax + 0xec]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x4c88], r12
mov dword [rdi + 0x5ad8], r12d
mov rcx, qword [rdi + 0x5ae8]
test rcx, rcx
je 0x14001376c
mov qword [rdi + 0x5ae0], r12
mov rax, qword [0x1400cd1d8]
test rax, rax
je 0x14001375f
dec dword [rax + 0xec]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x5ae8], r12
mov rcx, qword [rdi + 0x5c58]
test rcx, rcx
je 0x14001379e
mov qword [rdi + 0x5c50], r12
mov rax, qword [0x1400cd1d8]
test rax, rax
je 0x140013791
dec dword [rax + 0xec]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x5c58], r12
mov rcx, qword [rdi + 0x5c48]
test rcx, rcx
je 0x1400137d0
mov qword [rdi + 0x5c40], r12
mov rax, qword [0x1400cd1d8]
test rax, rax
je 0x1400137c3
dec dword [rax + 0xec]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x5c48], r12
cmp qword [rdi + 0x5cd0], 0
je 0x140013801
mov rbx, qword [rdi + 0x5cd0]
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
cmp rbx, rax
je 0x1400137fa
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov qword [rdi + 0x5cd0], r12
mov rcx, qword [rdi + 0x5ce0]
test rcx, rcx
je 0x140013833
mov qword [rdi + 0x5cd8], r12
mov rax, qword [0x1400cd1d8]
test rax, rax
je 0x140013826
dec dword [rax + 0xec]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x5ce0], r12
mov rcx, qword [rdi + 0x5d18]
test rcx, rcx
je 0x140013865
mov qword [rdi + 0x5d10], r12
mov rax, qword [0x1400cd1d8]
test rax, rax
je 0x140013858
dec dword [rax + 0xec]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x5d18], r12
mov rcx, qword [rdi + 0x5d28]
test rcx, rcx
je 0x140013897
mov qword [rdi + 0x5d20], r12
mov rax, qword [0x1400cd1d8]
test rax, rax
je 0x14001388a
dec dword [rax + 0xec]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x5d28], r12
mov dword [rdi + 0x5d30], r12d
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