Function at 0x140015130
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push r12
push r14
push r15
sub rsp, 0x20
mov rbx, rcx
mov rax, qword [rcx + 0xa8]
test rax, rax
je 0x140015195
cmp byte [rcx + 1], 0
je 0x140015195
mov byte [rax], 0
mov rdi, qword [rcx + 0xa8]
test rdi, rdi
je 0x140015195
mov rcx, rdi
call fcn.14002ce90
mov rax, qword [0x1400732a8]
test rax, rax
je 0x14001518c
dec dword [rax + 0x3bc]
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
xor r12d, r12d
mov qword [rbx + 0xa8], r12
cmp byte [rbx], r12b
je 0x1400158c2
cmp byte [rbx + 0x2f60], r12b
je 0x1400152ad
mov r15, qword [rbx + 0x20]
test r15, r15
je 0x1400152ad
mov rdi, qword [0x1400732a8]
mov qword [0x1400732a8], rbx
mov dword [rbx + 0x2f64], r12d
lea rsi, [rbx + 0x2f68]
mov ecx, dword [rsi + 4]
test ecx, ecx
jns 0x1400151fe
mov eax, ecx
cdq
sub eax, edx
sar eax, 1
add eax, ecx
mov edx, r12d
test eax, eax
cmovg edx, eax
mov rcx, rsi
call fcn.140022510
mov dword [rsi], r12d
cmp dword [rsi + 4], r12d
jne 0x140015214
mov edx, 8
mov rcx, rsi
call fcn.140022510
movsxd rcx, dword [rsi]
mov rax, qword [rsi + 8]
mov byte [rcx + rax], r12b
inc dword [rsi]
mov ebp, r12d
cmp dword [rbx + 0x2f78], r12d
jle 0x140015254
mov r14, r12
mov rdx, qword [rbx + 0x2f80]
add rdx, r14
mov rax, qword [rdx + 0x20]
mov r8, rsi
mov rcx, rbx
call rax
inc ebp
add r14, 0x30
cmp ebp, dword [rbx + 0x2f78]
jl 0x140015230
mov eax, dword [rsi]
lea edx, [rax - 1]
test eax, eax
cmove edx, r12d
movsxd r14, edx
mov rax, qword [rbx + 0x2f70]
lea rbp, [0x140073294]
test rax, rax
cmovne rbp, rax
mov rcx, r15
call fcn.1400111b0
mov rsi, rax
test rax, rax
je 0x1400152a4
mov r9, rax
mov r8, r14
mov edx, 1
mov rcx, rbp
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov qword [0x1400732a8], rdi
jmp 0x1400152b4
mov rdi, qword [0x1400732a8]
mov ebp, r12d
cmp dword [rbx + 0x1a10], r12d
jle 0x1400153ea
mov r14, r12
nop word [rax + rax]
mov rax, qword [rbx + 0x1a18]
mov rsi, qword [r14 + rax]
test rsi, rsi
je 0x1400153d8
mov rcx, qword [rsi]
test rcx, rcx
je 0x1400152fd
test rdi, rdi
je 0x1400152f7
dec dword [rdi + 0x3bc]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov edi, r12d
cmp dword [rsi + 0x298], r12d
je 0x14001532d
nop dword [rax]
movsxd rax, edi
imul rcx, rax, 0x78
add rcx, qword [rsi + 0x2a0]
call fcn.140012d70
inc edi
cmp edi, dword [rsi + 0x298]
jne 0x140015310
lea rcx, [rsi + 0x2b8]
call fcn.14000fbf0
nop
mov rcx, qword [rsi + 0x2a0]
test rcx, rcx
je 0x14001535f
mov rax, qword [0x1400732a8]
test rax, rax
je 0x140015358
dec dword [rax + 0x3bc]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
nop
mov rcx, qword [rsi + 0x290]
test rcx, rcx
je 0x140015384
mov rax, qword [0x1400732a8]
test rax, rax
je 0x14001537d
dec dword [rax + 0x3bc]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
nop
lea rcx, [rsi + 0xd0]
call fcn.140012ca0
nop
mov rcx, qword [rsi + 0xc8]
test rcx, rcx
je 0x1400153b6
mov rax, qword [0x1400732a8]
test rax, rax
je 0x1400153af
dec dword [rax + 0x3bc]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
nop
mov rax, qword [0x1400732a8]
test rax, rax
je 0x1400153c8
dec dword [rax + 0x3bc]
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rdi, qword [0x1400732a8]
inc ebp
add r14, 8
cmp ebp, dword [rbx + 0x1a10]
jl 0x1400152d0
mov rcx, qword [rbx + 0x1a18]
test rcx, rcx
je 0x14001541c
mov qword [rbx + 0x1a10], r12
test rdi, rdi
je 0x140015408
dec dword [rdi + 0x3bc]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rbx + 0x1a18], r12
mov rdi, qword [0x1400732a8]
mov rcx, qword [rbx + 0x1a28]
test rcx, rcx
je 0x14001544e
mov qword [rbx + 0x1a20], r12
test rdi, rdi
je 0x14001543a
dec dword [rdi + 0x3bc]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rbx + 0x1a28], r12
mov rdi, qword [0x1400732a8]
mov rcx, qword [rbx + 0x1a38]
test rcx, rcx
je 0x140015480
mov qword [rbx + 0x1a30], r12
test rdi, rdi
je 0x14001546c
dec dword [rdi + 0x3bc]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rbx + 0x1a38], r12
mov rdi, qword [0x1400732a8]
mov qword [rbx + 0x1a68], r12
mov rcx, qword [rbx + 0x1a48]
test rcx, rcx
je 0x1400154b9
mov qword [rbx + 0x1a40], r12
test rdi, rdi
je 0x1400154a5
dec dword [rdi + 0x3bc]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rbx + 0x1a48], r12
mov rdi, qword [0x1400732a8]
mov rcx, qword [rbx + 0x1a58]
test rcx, rcx
je 0x1400154eb
mov qword [rbx + 0x1a50], r12
test rdi, rdi
je 0x1400154d7
dec dword [rdi + 0x3bc]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rbx + 0x1a58], r12
mov rdi, qword [0x1400732a8]
mov qword [rbx + 0x1bd8], r12
mov qword [rbx + 0x1a78], r12
mov qword [rbx + 0x1a70], r12
mov qword [rbx + 0x1af8], r12
mov qword [rbx + 0x1ae0], r12
mov qword [rbx + 0x1a80], r12
mov rcx, qword [rbx + 0x1b90]
test rcx, rcx
je 0x140015547
mov qword [rbx + 0x1b88], r12
test rdi, rdi
je 0x140015533
dec dword [rdi + 0x3bc]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rbx + 0x1b90], r12
mov rdi, qword [0x1400732a8]
mov rcx, qword [rbx + 0x1ba0]
test rcx, rcx
je 0x140015579
mov qword [rbx + 0x1b98], r12
test rdi, rdi
je 0x140015565
dec dword [rdi + 0x3bc]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rbx + 0x1ba0], r12
mov rdi, qword [0x1400732a8]
mov rcx, qword [rbx + 0x1bb0]
test rcx, rcx
je 0x1400155ab
mov qword [rbx + 0x1ba8], r12
test rdi, rdi
je 0x140015597
dec dword [rdi + 0x3bc]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rbx + 0x1bb0], r12
mov rdi, qword [0x1400732a8]
mov rcx, qword [rbx + 0x1bc0]
test rcx, rcx
je 0x1400155dd
mov qword [rbx + 0x1bb8], r12
test rdi, rdi
je 0x1400155c9
dec dword [rdi + 0x3bc]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rbx + 0x1bc0], r12
mov rdi, qword [0x1400732a8]
mov rcx, qword [rbx + 0x1bd0]
test rcx, rcx
je 0x14001560f
mov qword [rbx + 0x1bc8], r12
test rdi, rdi
je 0x1400155fb
dec dword [rdi + 0x3bc]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rbx + 0x1bd0], r12
mov rdi, qword [0x1400732a8]
mov rcx, qword [rbx + 0x1d80]
test rcx, rcx
je 0x140015641
mov qword [rbx + 0x1d78], r12
test rdi, rdi
je 0x14001562d
dec dword [rdi + 0x3bc]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rbx + 0x1d80], r12
mov rdi, qword [0x1400732a8]
cmp qword [rbx + 0x1d90], 0
je 0x140015676
mov qword [rbx + 0x1d88], r12
mov rcx, qword [rbx + 0x1d90]
test rcx, rcx
je 0x140015669
test rdi, rdi
je 0x140015669
dec dword [rdi + 0x3bc]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rbx + 0x1d90], r12
lea rcx, [rbx + 0x1da0]
call fcn.140029e50
lea rcx, [rbx + 0x1e48]
call fcn.140029e50
lea rcx, [rbx + 0x1f98]
call fcn.140021d10
mov rcx, qword [rbx + 0x1fc8]
test rcx, rcx
je 0x1400156cc
mov qword [rbx + 0x1fc0], r12
mov rax, qword [0x1400732a8]
test rax, rax
je 0x1400156bf
dec dword [rax + 0x3bc]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rbx + 0x1fc8], r12
mov rcx, qword [rbx + 0x1fd8]
test rcx, rcx
je 0x1400156fe
mov qword [rbx + 0x1fd0], r12
mov rax, qword [0x1400732a8]
test rax, rax
je 0x1400156f1
dec dword [rax + 0x3bc]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rbx + 0x1fd8], r12
mov rcx, qword [rbx + 0x2f38]
test rcx, rcx
je 0x140015730
mov qword [rbx + 0x2f30], r12
mov rax, qword [0x1400732a8]
test rax, rax
je 0x140015723
dec dword [rax + 0x3bc]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rbx + 0x2f38], r12
mov rcx, qword [rbx + 0x2f48]
test rcx, rcx
je 0x140015762
mov qword [rbx + 0x2f40], r12
mov rax, qword [0x1400732a8]
test rax, rax
je 0x140015755
dec dword [rax + 0x3bc]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rbx + 0x2f48], r12
mov rcx, qword [rbx + 0x2000]
test rcx, rcx
je 0x140015794
mov qword [rbx + 0x1ff8], r12
mov rax, qword [0x1400732a8]
test rax, rax
je 0x140015787
dec dword [rax + 0x3bc]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rbx + 0x2000], r12
mov rcx, qword [rbx + 0x2010]
test rcx, rcx
je 0x1400157c6
mov qword [rbx + 0x2008], r12
mov rax, qword [0x1400732a8]
test rax, rax
je 0x1400157b9
dec dword [rax + 0x3bc]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rbx + 0x2010], r12
mov rcx, qword [rbx + 0x2020]
test rcx, rcx
je 0x1400157f8
mov qword [rbx + 0x2018], r12
mov rax, qword [0x1400732a8]
test rax, rax
je 0x1400157eb
dec dword [rax + 0x3bc]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rbx + 0x2020], r12
mov rcx, qword [rbx + 0x2f90]
test rcx, rcx
je 0x14001582a
mov qword [rbx + 0x2f88], r12
mov rax, qword [0x1400732a8]
test rax, rax
je 0x14001581d
dec dword [rax + 0x3bc]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rbx + 0x2f90], r12
mov rcx, qword [rbx + 0x2f80]
test rcx, rcx
je 0x14001585c
mov qword [rbx + 0x2f78], r12
mov rax, qword [0x1400732a8]
test rax, rax
je 0x14001584f
dec dword [rax + 0x3bc]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rbx + 0x2f80], r12
cmp qword [rbx + 0x2fa0], 0
je 0x14001588d
mov rdi, qword [rbx + 0x2fa0]
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
cmp rdi, rax
je 0x140015886
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov qword [rbx + 0x2fa0], r12
mov rcx, qword [rbx + 0x2fb0]
test rcx, rcx
je 0x1400158bf
mov qword [rbx + 0x2fa8], r12
mov rax, qword [0x1400732a8]
test rax, rax
je 0x1400158b2
dec dword [rax + 0x3bc]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rbx + 0x2fb0], r12
mov byte [rbx], 0
mov rbx, qword [rsp + 0x40]
mov rbp, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
mov rdi, qword [rsp + 0x58]
add rsp, 0x20
pop r15
pop r14
pop r12
ret