Function at 0x18000d970
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 + 0x50]
test rax, rax
je 0x18000d9c8
cmp byte [rcx + 1], 0
je 0x18000d9c8
mov byte [rax + 0x18], 0
mov rbx, qword [rcx + 0x50]
test rbx, rbx
je 0x18000d9c8
mov rcx, rbx
call fcn.1800291e0
mov rax, qword [0x18004dcd0]
test rax, rax
je 0x18000d9bf
dec dword [rax + 0x158]
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
xor r12d, r12d
mov qword [rdi + 0x50], r12
cmp byte [rdi], r12b
je 0x18000e18d
cmp byte [rdi + 0x46f9], r12b
je 0x18000da4e
mov rbx, qword [rdi + 0x20]
test rbx, rbx
je 0x18000da4e
mov rsi, qword [0x18004dcd0]
mov qword [0x18004dcd0], rdi
mov dword [rdi + 0x46fc], r12d
mov qword [rsp + 0x50], r12
lea rcx, [rsp + 0x50]
call fcn.18001b8f0
mov rbp, rax
lea rdx, [0x180044e5c]
mov rcx, rbx
call fcn.180007bc0
mov rbx, rax
test rax, rax
je 0x18000da47
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 [0x18004dcd0], rsi
mov ebx, r12d
cmp dword [rdi + 0x4740], r12d
jle 0x18000da90
mov rsi, r12
nop dword [rax]
mov rcx, qword [rdi + 0x4748]
cmp dword [rsi + rcx + 4], 6
jne 0x18000da82
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 + 0x4740]
jl 0x18000da60
mov esi, r12d
cmp dword [rdi + 0x31d0], r12d
jle 0x18000dae1
mov r14, r12
nop
mov rax, qword [rdi + 0x31d8]
mov rbx, qword [r14 + rax]
test rbx, rbx
je 0x18000dad3
mov rcx, rbx
call fcn.18000a6b0
mov rax, qword [0x18004dcd0]
test rax, rax
je 0x18000daca
dec dword [rax + 0x158]
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 + 0x31d0]
jl 0x18000daa0
mov rcx, qword [rdi + 0x31d8]
test rcx, rcx
je 0x18000db13
mov qword [rdi + 0x31d0], r12
mov rax, qword [0x18004dcd0]
test rax, rax
je 0x18000db06
dec dword [rax + 0x158]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x31d8], r12
mov rcx, qword [rdi + 0x31e8]
test rcx, rcx
je 0x18000db45
mov qword [rdi + 0x31e0], r12
mov rax, qword [0x18004dcd0]
test rax, rax
je 0x18000db38
dec dword [rax + 0x158]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x31e8], r12
mov rcx, qword [rdi + 0x31f8]
test rcx, rcx
je 0x18000db77
mov qword [rdi + 0x31f0], r12
mov rax, qword [0x18004dcd0]
test rax, rax
je 0x18000db6a
dec dword [rax + 0x158]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x31f8], r12
mov qword [rdi + 0x3230], r12
mov rcx, qword [rdi + 0x3208]
test rcx, rcx
je 0x18000dbb0
mov qword [rdi + 0x3200], r12
mov rax, qword [0x18004dcd0]
test rax, rax
je 0x18000dba3
dec dword [rax + 0x158]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x3208], r12
mov rcx, qword [rdi + 0x3218]
test rcx, rcx
je 0x18000dbe2
mov qword [rdi + 0x3210], r12
mov rax, qword [0x18004dcd0]
test rax, rax
je 0x18000dbd5
dec dword [rax + 0x158]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x3218], r12
mov qword [rdi + 0x3438], r12
mov qword [rdi + 0x3240], r12
mov qword [rdi + 0x3238], r12
mov qword [rdi + 0x32c8], r12
mov qword [rdi + 0x32b0], r12
mov qword [rdi + 0x3248], r12
mov rcx, qword [rdi + 0x33a8]
test rcx, rcx
je 0x18000dc3e
mov qword [rdi + 0x33a0], r12
mov rax, qword [0x18004dcd0]
test rax, rax
je 0x18000dc31
dec dword [rax + 0x158]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x33a8], r12
mov rcx, qword [rdi + 0x33b8]
test rcx, rcx
je 0x18000dc70
mov qword [rdi + 0x33b0], r12
mov rax, qword [0x18004dcd0]
test rax, rax
je 0x18000dc63
dec dword [rax + 0x158]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x33b8], r12
mov rcx, qword [rdi + 0x33c8]
test rcx, rcx
je 0x18000dca2
mov qword [rdi + 0x33c0], r12
mov rax, qword [0x18004dcd0]
test rax, rax
je 0x18000dc95
dec dword [rax + 0x158]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x33c8], r12
mov rcx, qword [rdi + 0x3408]
test rcx, rcx
je 0x18000dcd4
mov qword [rdi + 0x3400], r12
mov rax, qword [0x18004dcd0]
test rax, rax
je 0x18000dcc7
dec dword [rax + 0x158]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x3408], r12
mov rcx, qword [rdi + 0x3418]
test rcx, rcx
je 0x18000dd06
mov qword [rdi + 0x3410], r12
mov rax, qword [0x18004dcd0]
test rax, rax
je 0x18000dcf9
dec dword [rax + 0x158]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x3418], r12
mov ebp, r12d
cmp dword [rdi + 0x3428], r12d
jle 0x18000ddd4
mov r14, r12
nop dword [rax]
mov rax, qword [rdi + 0x3430]
mov rbx, qword [r14 + rax]
test rbx, rbx
je 0x18000ddc2
mov rsi, qword [rbx + 0x38]
test rsi, rsi
je 0x18000dd60
mov rcx, rsi
call fcn.1800066c0
mov rax, qword [0x18004dcd0]
test rax, rax
je 0x18000dd57
dec dword [rax + 0x158]
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 0x18000dd8d
mov rcx, rsi
call fcn.1800066c0
mov rax, qword [0x18004dcd0]
test rax, rax
je 0x18000dd83
dec dword [rax + 0x158]
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
nop
lea rcx, [rbx + 0x78]
lea r9, [0x180005d40]
mov edx, 0x10
lea r8d, [rdx - 0xe]
call fcn.18003d948
nop
mov rax, qword [0x18004dcd0]
test rax, rax
je 0x18000ddb9
dec dword [rax + 0x158]
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 + 0x3428]
jl 0x18000dd20
mov rcx, qword [rdi + 0x3430]
test rcx, rcx
je 0x18000de06
mov qword [rdi + 0x3428], r12
mov rax, qword [0x18004dcd0]
test rax, rax
je 0x18000ddf9
dec dword [rax + 0x158]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x3430], r12
lea rcx, [rdi + 0x36f8]
call fcn.18001c7f0
mov rcx, qword [rdi + 0x3728]
test rcx, rcx
je 0x18000de44
mov qword [rdi + 0x3720], r12
mov rax, qword [0x18004dcd0]
test rax, rax
je 0x18000de37
dec dword [rax + 0x158]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x3728], r12
mov rcx, qword [rdi + 0x3738]
test rcx, rcx
je 0x18000de76
mov qword [rdi + 0x3730], r12
mov rax, qword [0x18004dcd0]
test rax, rax
je 0x18000de69
dec dword [rax + 0x158]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x3738], r12
mov ebx, r12d
cmp dword [rdi + 0x3678], r12d
jle 0x18000dec8
mov rsi, r12
nop word [rax + rax]
mov rax, qword [rdi + 0x3680]
mov rcx, qword [rsi + rax + 0x20]
test rcx, rcx
je 0x18000deba
mov rax, qword [0x18004dcd0]
test rax, rax
je 0x18000deb3
dec dword [rax + 0x158]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
nop
inc ebx
add rsi, 0x28
cmp ebx, dword [rdi + 0x3678]
jl 0x18000de90
mov rcx, qword [rdi + 0x3680]
test rcx, rcx
je 0x18000defa
mov qword [rdi + 0x3678], r12
mov rax, qword [0x18004dcd0]
test rax, rax
je 0x18000deed
dec dword [rax + 0x158]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x3680], r12
lea rcx, [rdi + 0x36a8]
call fcn.18001c970
mov esi, r12d
cmp dword [rdi + 0x3698], r12d
jle 0x18000df65
mov rbp, r12
nop word [rax + rax]
mov rbx, qword [rdi + 0x36a0]
lea rcx, [rbx + 0x10]
add rcx, rbp
call fcn.180028c60
nop
mov rcx, qword [rbx + rbp + 0x20]
test rcx, rcx
je 0x18000df57
mov rax, qword [0x18004dcd0]
test rax, rax
je 0x18000df50
dec dword [rax + 0x158]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
nop
inc esi
add rbp, 0x70
cmp esi, dword [rdi + 0x3698]
jl 0x18000df20
mov rcx, qword [rdi + 0x36a0]
test rcx, rcx
je 0x18000df97
mov qword [rdi + 0x3698], r12
mov rax, qword [0x18004dcd0]
test rax, rax
je 0x18000df8a
dec dword [rax + 0x158]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x36a0], r12
mov rcx, qword [rdi + 0x36e8]
test rcx, rcx
je 0x18000dfc9
mov qword [rdi + 0x36e0], r12
mov rax, qword [0x18004dcd0]
test rax, rax
je 0x18000dfbc
dec dword [rax + 0x158]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x36e8], r12
mov rcx, qword [rdi + 0x46c0]
test rcx, rcx
je 0x18000dffb
mov qword [rdi + 0x46b8], r12
mov rax, qword [0x18004dcd0]
test rax, rax
je 0x18000dfee
dec dword [rax + 0x158]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x46c0], r12
mov rcx, qword [rdi + 0x46d0]
test rcx, rcx
je 0x18000e02d
mov qword [rdi + 0x46c8], r12
mov rax, qword [0x18004dcd0]
test rax, rax
je 0x18000e020
dec dword [rax + 0x158]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x46d0], r12
mov rcx, qword [rdi + 0x3760]
test rcx, rcx
je 0x18000e05f
mov qword [rdi + 0x3758], r12
mov rax, qword [0x18004dcd0]
test rax, rax
je 0x18000e052
dec dword [rax + 0x158]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x3760], r12
mov rcx, qword [rdi + 0x3770]
test rcx, rcx
je 0x18000e091
mov qword [rdi + 0x3768], r12
mov rax, qword [0x18004dcd0]
test rax, rax
je 0x18000e084
dec dword [rax + 0x158]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x3770], r12
mov rcx, qword [rdi + 0x3780]
test rcx, rcx
je 0x18000e0c3
mov qword [rdi + 0x3778], r12
mov rax, qword [0x18004dcd0]
test rax, rax
je 0x18000e0b6
dec dword [rax + 0x158]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x3780], r12
mov rcx, qword [rdi + 0x4728]
test rcx, rcx
je 0x18000e0f5
mov qword [rdi + 0x4720], r12
mov rax, qword [0x18004dcd0]
test rax, rax
je 0x18000e0e8
dec dword [rax + 0x158]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x4728], r12
mov rcx, qword [rdi + 0x4718]
test rcx, rcx
je 0x18000e127
mov qword [rdi + 0x4710], r12
mov rax, qword [0x18004dcd0]
test rax, rax
je 0x18000e11a
dec dword [rax + 0x158]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x4718], r12
cmp qword [rdi + 0x4760], 0
je 0x18000e158
mov rbx, qword [rdi + 0x4760]
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
cmp rbx, rax
je 0x18000e151
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov qword [rdi + 0x4760], r12
mov rcx, qword [rdi + 0x4770]
test rcx, rcx
je 0x18000e18a
mov qword [rdi + 0x4768], r12
mov rax, qword [0x18004dcd0]
test rax, rax
je 0x18000e17d
dec dword [rax + 0x158]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x4770], 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