Function at 0x140020170
Capabilities:
Write file on windows

Disassembly:
push rbx
push rdi
push r15
sub rsp, 0x20
mov rax, qword [rcx + 0xa8]
mov rbx, rcx
test rax, rax
je 0x1400201c1
cmp byte [rcx + 1], 0
je 0x1400201c1
mov byte [rax + 0x18], 0
mov rdi, qword [rcx + 0xa8]
test rdi, rdi
je 0x1400201c1
mov rcx, rdi
call fcn.14004d720
mov rax, qword [0x1401034f8]
test rax, rax
je 0x1400201b8
dec dword [rax + 0x3b0]
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
xor r15d, r15d
mov qword [rbx + 0xa8], r15
cmp byte [rbx], r15b
je 0x1400208e0
mov qword [rsp + 0x48], rbp
mov qword [rsp + 0x50], rsi
cmp byte [rbx + 0x31f8], r15b
je 0x14002024e
mov rdi, qword [rbx + 0x20]
test rdi, rdi
je 0x14002024e
mov rsi, qword [0x1401034f8]
lea rcx, [rsp + 0x40]
mov qword [0x1401034f8], rbx
mov dword [rbx + 0x31fc], r15d
mov qword [rsp + 0x40], r15
call fcn.140031b00
lea rdx, [0x1400e850c]
mov rcx, rdi
mov rbp, rax
call fcn.140019da0
mov rdi, rax
test rax, rax
je 0x140020255
mov r8, qword [rsp + 0x40]
lea edx, [r15 + 1]
mov r9, rax
mov rcx, rbp
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
jmp 0x140020255
mov rsi, qword [0x1401034f8]
mov qword [0x1401034f8], rbx
call fcn.140034b10
mov eax, dword [rbx + 0x31c0]
mov qword [0x1401034f8], rsi
mov esi, r15d
test eax, eax
jle 0x1400202ef
mov qword [rsp + 0x58], r14
mov rbp, r15
mov r14, r15
test rbp, rbp
js 0x140020289
cmp esi, eax
jl 0x1400202a3
mov r8d, 0x6c7
lea rdx, [0x1400e3e30]
lea rcx, str.i___0__i___Size
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__wassert]
mov rax, qword [rbx + 0x31c8]
mov rdi, qword [rax + r14 + 8]
test rdi, rdi
je 0x1400202d7
mov rcx, rdi
call fcn.140036c70
mov rax, qword [0x1401034f8]
test rax, rax
je 0x1400202ce
dec dword [rax + 0x3b0]
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov eax, dword [rbx + 0x31c0]
inc esi
inc rbp
add r14, 0x10
cmp esi, eax
jl 0x140020280
mov r14, qword [rsp + 0x58]
mov edx, 6
mov rcx, rbx
call fcn.14001d350
mov eax, dword [rbx + 0x1cb8]
mov ebp, r15d
test eax, eax
jle 0x140020375
mov rsi, r15
nop dword [rax]
test rsi, rsi
js 0x140020319
cmp ebp, eax
jl 0x140020333
mov r8d, 0x6c7
lea rdx, [0x1400e3e30]
lea rcx, str.i___0__i___Size
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__wassert]
mov rax, qword [rbx + 0x1cc0]
mov rdi, qword [rax + rsi*8]
test rdi, rdi
je 0x140020366
mov rcx, rdi
call fcn.14001cab0
mov rax, qword [0x1401034f8]
test rax, rax
je 0x14002035d
dec dword [rax + 0x3b0]
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov eax, dword [rbx + 0x1cb8]
inc ebp
inc rsi
cmp ebp, eax
jl 0x140020310
mov rcx, qword [rbx + 0x1cc0]
mov rbp, qword [rsp + 0x48]
test rcx, rcx
je 0x1400203ac
mov rax, qword [0x1401034f8]
mov qword [rbx + 0x1cb8], r15
test rax, rax
je 0x14002039f
dec dword [rax + 0x3b0]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rbx + 0x1cc0], r15
mov rcx, qword [rbx + 0x1cd0]
test rcx, rcx
je 0x1400203de
mov rax, qword [0x1401034f8]
mov qword [rbx + 0x1cc8], r15
test rax, rax
je 0x1400203d1
dec dword [rax + 0x3b0]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rbx + 0x1cd0], r15
mov rcx, qword [rbx + 0x1ce0]
test rcx, rcx
je 0x140020410
mov rax, qword [0x1401034f8]
mov qword [rbx + 0x1cd8], r15
test rax, rax
je 0x140020403
dec dword [rax + 0x3b0]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rbx + 0x1ce0], r15
mov qword [rbx + 0x1d18], r15
mov rcx, qword [rbx + 0x1cf0]
test rcx, rcx
je 0x140020449
mov rax, qword [0x1401034f8]
mov qword [rbx + 0x1ce8], r15
test rax, rax
je 0x14002043c
dec dword [rax + 0x3b0]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rbx + 0x1cf0], r15
mov rcx, qword [rbx + 0x1d00]
test rcx, rcx
je 0x14002047b
mov rax, qword [0x1401034f8]
mov qword [rbx + 0x1cf8], r15
test rax, rax
je 0x14002046e
dec dword [rax + 0x3b0]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rbx + 0x1d00], r15
mov qword [rbx + 0x1f50], r15
mov qword [rbx + 0x1d28], r15
mov qword [rbx + 0x1d20], r15
mov qword [rbx + 0x1db0], r15
mov qword [rbx + 0x1d98], r15
mov qword [rbx + 0x1d38], r15
mov rcx, qword [rbx + 0x1e78]
test rcx, rcx
je 0x1400204d7
mov rax, qword [0x1401034f8]
mov qword [rbx + 0x1e70], r15
test rax, rax
je 0x1400204ca
dec dword [rax + 0x3b0]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rbx + 0x1e78], r15
mov rcx, qword [rbx + 0x1e88]
test rcx, rcx
je 0x140020509
mov rax, qword [0x1401034f8]
mov qword [rbx + 0x1e80], r15
test rax, rax
je 0x1400204fc
dec dword [rax + 0x3b0]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rbx + 0x1e88], r15
mov rcx, qword [rbx + 0x1e98]
test rcx, rcx
je 0x14002053b
mov rax, qword [0x1401034f8]
mov qword [rbx + 0x1e90], r15
test rax, rax
je 0x14002052e
dec dword [rax + 0x3b0]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rbx + 0x1e98], r15
mov rcx, qword [rbx + 0x1ed8]
test rcx, rcx
je 0x14002056d
mov rax, qword [0x1401034f8]
mov qword [rbx + 0x1ed0], r15
test rax, rax
je 0x140020560
dec dword [rax + 0x3b0]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rbx + 0x1ed8], r15
mov rcx, qword [rbx + 0x1ee8]
test rcx, rcx
je 0x14002059f
mov rax, qword [0x1401034f8]
mov qword [rbx + 0x1ee0], r15
test rax, rax
je 0x140020592
dec dword [rax + 0x3b0]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rbx + 0x1ee8], r15
mov eax, dword [rbx + 0x1ef0]
mov edi, r15d
mov qword [rbx + 0x1f18], r15
mov qword [rbx + 0x1f10], r15
mov qword [rbx + 0x1f08], r15
test eax, eax
jle 0x140020606
mov rsi, r15
test rsi, rsi
js 0x1400205cd
cmp edi, eax
jl 0x1400205e7
mov r8d, 0x6c7
lea rdx, [0x1400e3e30]
lea rcx, str.i___0__i___Size
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__wassert]
mov rcx, qword [rbx + 0x1ef8]
mov rcx, qword [rcx + rsi*8]
call fcn.140040f10
mov eax, dword [rbx + 0x1ef0]
inc edi
inc rsi
cmp edi, eax
jl 0x1400205c4
mov rcx, qword [rbx + 0x1ef8]
mov rsi, qword [rsp + 0x50]
test rcx, rcx
je 0x14002063d
mov rax, qword [0x1401034f8]
mov qword [rbx + 0x1ef0], r15
test rax, rax
je 0x140020630
dec dword [rax + 0x3b0]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rbx + 0x1ef8], r15
lea rcx, [rbx + 0x21e0]
call fcn.14003fac0
mov rcx, qword [rbx + 0x2210]
test rcx, rcx
je 0x14002067b
mov rax, qword [0x1401034f8]
mov qword [rbx + 0x2208], r15
test rax, rax
je 0x14002066e
dec dword [rax + 0x3b0]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rbx + 0x2210], r15
mov rcx, qword [rbx + 0x2220]
test rcx, rcx
je 0x1400206ad
mov rax, qword [0x1401034f8]
mov qword [rbx + 0x2218], r15
test rax, rax
je 0x1400206a0
dec dword [rax + 0x3b0]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rbx + 0x2220], r15
lea rcx, [rbx + 0x2180]
call fcn.14003fc80
mov rcx, qword [rbx + 0x21b0]
test rcx, rcx
je 0x1400206eb
mov rax, qword [0x1401034f8]
mov qword [rbx + 0x21a8], r15
test rax, rax
je 0x1400206de
dec dword [rax + 0x3b0]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rbx + 0x21b0], r15
mov rcx, qword [rbx + 0x21d0]
test rcx, rcx
je 0x14002071d
mov rax, qword [0x1401034f8]
mov qword [rbx + 0x21c8], r15
test rax, rax
je 0x140020710
dec dword [rax + 0x3b0]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rbx + 0x21d0], r15
mov rcx, qword [rbx + 0x3188]
test rcx, rcx
je 0x14002074f
mov rax, qword [0x1401034f8]
mov qword [rbx + 0x3180], r15
test rax, rax
je 0x140020742
dec dword [rax + 0x3b0]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rbx + 0x3188], r15
mov rcx, qword [rbx + 0x3198]
test rcx, rcx
je 0x140020781
mov rax, qword [0x1401034f8]
mov qword [rbx + 0x3190], r15
test rax, rax
je 0x140020774
dec dword [rax + 0x3b0]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rbx + 0x3198], r15
mov rcx, qword [rbx + 0x2248]
test rcx, rcx
je 0x1400207b3
mov rax, qword [0x1401034f8]
mov qword [rbx + 0x2240], r15
test rax, rax
je 0x1400207a6
dec dword [rax + 0x3b0]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rbx + 0x2248], r15
mov rcx, qword [rbx + 0x2258]
test rcx, rcx
je 0x1400207e5
mov rax, qword [0x1401034f8]
mov qword [rbx + 0x2250], r15
test rax, rax
je 0x1400207d8
dec dword [rax + 0x3b0]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rbx + 0x2258], r15
mov rcx, qword [rbx + 0x2268]
test rcx, rcx
je 0x140020817
mov rax, qword [0x1401034f8]
mov qword [rbx + 0x2260], r15
test rax, rax
je 0x14002080a
dec dword [rax + 0x3b0]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rbx + 0x2268], r15
mov rcx, qword [rbx + 0x3228]
test rcx, rcx
je 0x140020849
mov rax, qword [0x1401034f8]
mov qword [rbx + 0x3220], r15
test rax, rax
je 0x14002083c
dec dword [rax + 0x3b0]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rbx + 0x3228], r15
mov rcx, qword [rbx + 0x3218]
test rcx, rcx
je 0x14002087b
mov rax, qword [0x1401034f8]
mov qword [rbx + 0x3210], r15
test rax, rax
je 0x14002086e
dec dword [rax + 0x3b0]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rbx + 0x3218], r15
cmp qword [rbx + 0x3260], r15
je 0x1400208ab
mov rdi, qword [rbx + 0x3260]
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
cmp rdi, rax
je 0x1400208a4
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov qword [rbx + 0x3260], r15
mov rcx, qword [rbx + 0x3270]
test rcx, rcx
je 0x1400208dd
mov rax, qword [0x1401034f8]
mov qword [rbx + 0x3268], r15
test rax, rax
je 0x1400208d0
dec dword [rax + 0x3b0]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rbx + 0x3270], r15
mov byte [rbx], r15b
add rsp, 0x20
pop r15
pop rdi
pop rbx
ret