Function at 0x180006650
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
push r14
push r15
sub rsp, 0x20
mov rax, qword [0x1802561b0]
mov rdi, rax
mov rcx, qword [rax + 0x58]
test rcx, rcx
je 0x1800066be
cmp byte [rax + 1], 0
je 0x1800066be
mov byte [rcx + 0x18], 0
mov rbx, qword [rax + 0x58]
test rbx, rbx
je 0x1800066be
mov rcx, rbx
call fcn.180030190
mov rax, qword [0x1802561b0]
test rax, rax
je 0x1800066a8
dec dword [rax + 0xf4]
mov rdx, qword [0x1802561a0]
mov rcx, rbx
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov rax, qword [0x1802561b0]
xor r15d, r15d
mov qword [rdi + 0x58], r15
mov rcx, qword [rdi + 0x3c60]
test rcx, rcx
je 0x1800066fd
mov qword [rdi + 0x3c58], r15
test rax, rax
je 0x1800066e3
dec dword [rax + 0xf4]
mov rdx, qword [0x1802561a0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x3c60], r15
mov rax, qword [0x1802561b0]
cmp byte [rdi], r15b
je 0x180006fe6
cmp byte [rdi + 0x5be9], r15b
je 0x180006767
mov rbx, qword [rdi + 0x20]
test rbx, rbx
je 0x180006767
mov dword [rax + 0x5bec], r15d
mov qword [rsp + 0x40], r15
lea rcx, [rsp + 0x40]
call fcn.18001eb50
mov rsi, rax
lea rdx, [0x18009946c]
mov rcx, rbx
call fcn.180004110
mov rbx, rax
test rax, rax
je 0x180006767
mov r9, rax
mov r8, qword [rsp + 0x40]
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 edx, 6
mov rcx, rdi
call fcn.180007000
mov esi, r15d
cmp dword [rdi + 0x3e98], r15d
jle 0x1800067d7
mov r14, r15
nop dword [rax]
nop word [rax + rax]
mov rax, qword [rdi + 0x3ea0]
mov rbx, qword [r14 + rax]
test rbx, rbx
je 0x1800067c9
mov rcx, rbx
call fcn.180007660
mov rax, qword [0x1802561b0]
test rax, rax
je 0x1800067ba
dec dword [rax + 0xf4]
mov rdx, qword [0x1802561a0]
mov rcx, rbx
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
inc esi
add r14, 8
cmp esi, dword [rdi + 0x3e98]
jl 0x180006790
mov rcx, qword [rdi + 0x3ea0]
test rcx, rcx
je 0x18000680f
mov qword [rdi + 0x3e98], r15
mov rax, qword [0x1802561b0]
test rax, rax
je 0x1800067fc
dec dword [rax + 0xf4]
mov rdx, qword [0x1802561a0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x3ea0], r15
mov rcx, qword [rdi + 0x3eb0]
test rcx, rcx
je 0x180006847
mov qword [rdi + 0x3ea8], r15
mov rax, qword [0x1802561b0]
test rax, rax
je 0x180006834
dec dword [rax + 0xf4]
mov rdx, qword [0x1802561a0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x3eb0], r15
mov rcx, qword [rdi + 0x3ec0]
test rcx, rcx
je 0x18000687f
mov qword [rdi + 0x3eb8], r15
mov rax, qword [0x1802561b0]
test rax, rax
je 0x18000686c
dec dword [rax + 0xf4]
mov rdx, qword [0x1802561a0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x3ec0], r15
mov qword [rdi + 0x3ef8], r15
mov rcx, qword [rdi + 0x3ed0]
test rcx, rcx
je 0x1800068be
mov qword [rdi + 0x3ec8], r15
mov rax, qword [0x1802561b0]
test rax, rax
je 0x1800068ab
dec dword [rax + 0xf4]
mov rdx, qword [0x1802561a0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x3ed0], r15
mov rcx, qword [rdi + 0x3ee0]
test rcx, rcx
je 0x1800068f6
mov qword [rdi + 0x3ed8], r15
mov rax, qword [0x1802561b0]
test rax, rax
je 0x1800068e3
dec dword [rax + 0xf4]
mov rdx, qword [0x1802561a0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x3ee0], r15
mov qword [rdi + 0x48d8], r15
mov qword [rdi + 0x3f08], r15
mov qword [rdi + 0x3f00], r15
mov qword [rdi + 0x3f90], r15
mov qword [rdi + 0x3f78], r15
mov qword [rdi + 0x3f10], r15
lea rcx, [rdi + 0x4630]
call fcn.180001da0
mov rcx, qword [rdi + 0x4848]
test rcx, rcx
je 0x180006964
mov qword [rdi + 0x4840], r15
mov rax, qword [0x1802561b0]
test rax, rax
je 0x180006951
dec dword [rax + 0xf4]
mov rdx, qword [0x1802561a0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4848], r15
mov rcx, qword [rdi + 0x4858]
test rcx, rcx
je 0x18000699c
mov qword [rdi + 0x4850], r15
mov rax, qword [0x1802561b0]
test rax, rax
je 0x180006989
dec dword [rax + 0xf4]
mov rdx, qword [0x1802561a0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4858], r15
mov rcx, qword [rdi + 0x4868]
test rcx, rcx
je 0x1800069d4
mov qword [rdi + 0x4860], r15
mov rax, qword [0x1802561b0]
test rax, rax
je 0x1800069c1
dec dword [rax + 0xf4]
mov rdx, qword [0x1802561a0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4868], r15
mov rcx, qword [rdi + 0x48a8]
test rcx, rcx
je 0x180006a0c
mov qword [rdi + 0x48a0], r15
mov rax, qword [0x1802561b0]
test rax, rax
je 0x1800069f9
dec dword [rax + 0xf4]
mov rdx, qword [0x1802561a0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x48a8], r15
mov rcx, qword [rdi + 0x48b8]
test rcx, rcx
je 0x180006a44
mov qword [rdi + 0x48b0], r15
mov rax, qword [0x1802561b0]
test rax, rax
je 0x180006a31
dec dword [rax + 0xf4]
mov rdx, qword [0x1802561a0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x48b8], r15
mov ebp, r15d
cmp dword [rdi + 0x48c8], r15d
jle 0x180006b26
mov r14, r15
nop word [rax + rax]
mov rax, qword [rdi + 0x48d0]
mov rbx, qword [r14 + rax]
test rbx, rbx
je 0x180006b14
mov rsi, qword [rbx + 0x38]
test rsi, rsi
je 0x180006aa6
mov rcx, rsi
call fcn.180001c50
mov rax, qword [0x1802561b0]
test rax, rax
je 0x180006a97
dec dword [rax + 0xf4]
mov rdx, qword [0x1802561a0]
mov rcx, rsi
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov rsi, qword [rbx + 0x40]
test rsi, rsi
je 0x180006ad9
mov rcx, rsi
call fcn.180001c50
mov rax, qword [0x1802561b0]
test rax, rax
je 0x180006ac9
dec dword [rax + 0xf4]
mov rdx, qword [0x1802561a0]
mov rcx, rsi
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
nop
lea rcx, [rbx + 0x78]
lea r9, [0x18001fdf0]
mov edx, 0x10
lea r8d, [rdx - 0xe]
call fcn.18008e598
nop
mov rax, qword [0x1802561b0]
test rax, rax
je 0x180006b05
dec dword [rax + 0xf4]
mov rdx, qword [0x1802561a0]
mov rcx, rbx
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
inc ebp
add r14, 8
cmp ebp, dword [rdi + 0x48c8]
jl 0x180006a60
mov rcx, qword [rdi + 0x48d0]
test rcx, rcx
je 0x180006b5e
mov qword [rdi + 0x48c8], r15
mov rax, qword [0x1802561b0]
test rax, rax
je 0x180006b4b
dec dword [rax + 0xf4]
mov rdx, qword [0x1802561a0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x48d0], r15
lea rcx, [rdi + 0x4ba8]
call fcn.18001fe30
mov rcx, qword [rdi + 0x4bd8]
test rcx, rcx
je 0x180006ba2
mov qword [rdi + 0x4bd0], r15
mov rax, qword [0x1802561b0]
test rax, rax
je 0x180006b8f
dec dword [rax + 0xf4]
mov rdx, qword [0x1802561a0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4bd8], r15
mov rcx, qword [rdi + 0x4be8]
test rcx, rcx
je 0x180006bda
mov qword [rdi + 0x4be0], r15
mov rax, qword [0x1802561b0]
test rax, rax
je 0x180006bc7
dec dword [rax + 0xf4]
mov rdx, qword [0x1802561a0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4be8], r15
mov ebx, r15d
cmp dword [rdi + 0x4b28], r15d
jle 0x180006c2e
mov rsi, r15
nop dword [rax]
mov rax, qword [rdi + 0x4b30]
mov rcx, qword [rsi + rax + 0x20]
test rcx, rcx
je 0x180006c20
mov rax, qword [0x1802561b0]
test rax, rax
je 0x180006c13
dec dword [rax + 0xf4]
mov rdx, qword [0x1802561a0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
nop
inc ebx
add rsi, 0x28
cmp ebx, dword [rdi + 0x4b28]
jl 0x180006bf0
mov rcx, qword [rdi + 0x4b30]
test rcx, rcx
je 0x180006c66
mov qword [rdi + 0x4b28], r15
mov rax, qword [0x1802561b0]
test rax, rax
je 0x180006c53
dec dword [rax + 0xf4]
mov rdx, qword [0x1802561a0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4b30], r15
lea rcx, [rdi + 0x4b58]
call fcn.180020020
mov esi, r15d
cmp dword [rdi + 0x4b48], r15d
jle 0x180006ccc
mov rbp, r15
mov rbx, qword [rdi + 0x4b50]
lea rcx, [rbx + 0x10]
add rcx, rbp
call fcn.18002f520
nop
mov rcx, qword [rbx + rbp + 0x20]
test rcx, rcx
je 0x180006cbe
mov rax, qword [0x1802561b0]
test rax, rax
je 0x180006cb1
dec dword [rax + 0xf4]
mov rdx, qword [0x1802561a0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
nop
inc esi
add rbp, 0x70
cmp esi, dword [rdi + 0x4b48]
jl 0x180006c81
mov rcx, qword [rdi + 0x4b50]
test rcx, rcx
je 0x180006d04
mov qword [rdi + 0x4b48], r15
mov rax, qword [0x1802561b0]
test rax, rax
je 0x180006cf1
dec dword [rax + 0xf4]
mov rdx, qword [0x1802561a0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4b50], r15
mov rcx, qword [rdi + 0x4b98]
test rcx, rcx
je 0x180006d3c
mov qword [rdi + 0x4b90], r15
mov rax, qword [0x1802561b0]
test rax, rax
je 0x180006d29
dec dword [rax + 0xf4]
mov rdx, qword [0x1802561a0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4b98], r15
mov rcx, qword [rdi + 0x5bb0]
test rcx, rcx
je 0x180006d74
mov qword [rdi + 0x5ba8], r15
mov rax, qword [0x1802561b0]
test rax, rax
je 0x180006d61
dec dword [rax + 0xf4]
mov rdx, qword [0x1802561a0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x5bb0], r15
mov rcx, qword [rdi + 0x5bc0]
test rcx, rcx
je 0x180006dac
mov qword [rdi + 0x5bb8], r15
mov rax, qword [0x1802561b0]
test rax, rax
je 0x180006d99
dec dword [rax + 0xf4]
mov rdx, qword [0x1802561a0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x5bc0], r15
mov rcx, qword [rdi + 0x4c28]
test rcx, rcx
je 0x180006de4
mov qword [rdi + 0x4c20], r15
mov rax, qword [0x1802561b0]
test rax, rax
je 0x180006dd1
dec dword [rax + 0xf4]
mov rdx, qword [0x1802561a0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4c28], r15
mov rcx, qword [rdi + 0x4c38]
test rcx, rcx
je 0x180006e1c
mov qword [rdi + 0x4c30], r15
mov rax, qword [0x1802561b0]
test rax, rax
je 0x180006e09
dec dword [rax + 0xf4]
mov rdx, qword [0x1802561a0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4c38], r15
mov rcx, qword [rdi + 0x4c48]
test rcx, rcx
je 0x180006e54
mov qword [rdi + 0x4c40], r15
mov rax, qword [0x1802561b0]
test rax, rax
je 0x180006e41
dec dword [rax + 0xf4]
mov rdx, qword [0x1802561a0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4c48], r15
mov dword [rdi + 0x5a98], r15d
mov rcx, qword [rdi + 0x5aa8]
test rcx, rcx
je 0x180006e93
mov qword [rdi + 0x5aa0], r15
mov rax, qword [0x1802561b0]
test rax, rax
je 0x180006e80
dec dword [rax + 0xf4]
mov rdx, qword [0x1802561a0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x5aa8], r15
mov rcx, qword [rdi + 0x5c18]
test rcx, rcx
je 0x180006ecb
mov qword [rdi + 0x5c10], r15
mov rax, qword [0x1802561b0]
test rax, rax
je 0x180006eb8
dec dword [rax + 0xf4]
mov rdx, qword [0x1802561a0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x5c18], r15
mov rcx, qword [rdi + 0x5c08]
test rcx, rcx
je 0x180006f03
mov qword [rdi + 0x5c00], r15
mov rax, qword [0x1802561b0]
test rax, rax
je 0x180006ef0
dec dword [rax + 0xf4]
mov rdx, qword [0x1802561a0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x5c08], r15
cmp qword [rdi + 0x5c88], 0
je 0x180006f34
mov rbx, qword [rdi + 0x5c88]
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
cmp rbx, rax
je 0x180006f2d
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov qword [rdi + 0x5c88], r15
mov rcx, qword [rdi + 0x5c98]
test rcx, rcx
je 0x180006f6c
mov qword [rdi + 0x5c90], r15
mov rax, qword [0x1802561b0]
test rax, rax
je 0x180006f59
dec dword [rax + 0xf4]
mov rdx, qword [0x1802561a0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x5c98], r15
mov rcx, qword [rdi + 0x5cd0]
test rcx, rcx
je 0x180006fa4
mov qword [rdi + 0x5cc8], r15
mov rax, qword [0x1802561b0]
test rax, rax
je 0x180006f91
dec dword [rax + 0xf4]
mov rdx, qword [0x1802561a0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x5cd0], r15
mov rcx, qword [rdi + 0x5ce0]
test rcx, rcx
je 0x180006fdc
mov qword [rdi + 0x5cd8], r15
mov rax, qword [0x1802561b0]
test rax, rax
je 0x180006fc9
dec dword [rax + 0xf4]
mov rdx, qword [0x1802561a0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x5ce0], r15
mov dword [rdi + 0x5ce8], r15d
mov byte [rdi], 0
mov rbx, qword [rsp + 0x48]
mov rbp, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x58]
add rsp, 0x20
pop r15
pop r14
pop rdi
ret