Function at 0x1800056a0
Capabilities:
Write file on windows

Disassembly:
push rbx
push rdi
push r12
sub rsp, 0x30
mov rdi, qword [0x180067240]
mov rax, qword [rdi + 0x38]
test rax, rax
je 0x180005779
cmp byte [rdi + 1], 0
je 0x180005779
mov byte [rax + 0x18], 0
mov rbx, qword [rdi + 0x38]
test rbx, rbx
je 0x180005779
mov rcx, rbx
call fcn.180026760
mov rcx, qword [rbx + 0x80]
test rcx, rcx
je 0x18000570a
mov rax, qword [0x180067240]
test rax, rax
je 0x1800056fe
dec dword [rax + 0xec]
mov rdx, qword [0x180067248]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov rcx, qword [rbx + 0x70]
test rcx, rcx
je 0x180005731
mov rax, qword [0x180067240]
test rax, rax
je 0x180005725
dec dword [rax + 0xec]
mov rdx, qword [0x180067248]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov rcx, qword [rbx + 0x60]
test rcx, rcx
je 0x180005758
mov rax, qword [0x180067240]
test rax, rax
je 0x18000574c
dec dword [rax + 0xec]
mov rdx, qword [0x180067248]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov rax, qword [0x180067240]
test rax, rax
je 0x18000576a
dec dword [rax + 0xec]
mov rdx, qword [0x180067248]
mov rcx, rbx
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
xor r12d, r12d
mov qword [rdi + 0x38], r12
mov rcx, qword [rdi + 0x3c50]
test rcx, rcx
je 0x1800057b8
mov rax, qword [0x180067240]
mov qword [rdi + 0x3c48], r12
test rax, rax
je 0x1800057a5
dec dword [rax + 0xec]
mov rdx, qword [0x180067248]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x3c50], r12
cmp byte [rdi], r12b
je 0x1800060fc
mov qword [rsp + 0x60], rsi
mov qword [rsp + 0x28], r14
cmp byte [rdi + 0x5bf9], r12b
je 0x180005833
mov rbx, qword [rdi + 0x20]
test rbx, rbx
je 0x180005833
mov rax, qword [0x180067240]
lea rcx, [rsp + 0x50]
mov qword [rsp + 0x50], r12
mov dword [rax + 0x5bfc], r12d
call fcn.180018ec0
lea rdx, [0x18004319c]
mov rcx, rbx
mov rsi, rax
call fcn.180003430
mov rbx, rax
test rax, rax
je 0x180005833
mov r8, qword [rsp + 0x50]
mov r9, rax
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 + 0x5c40], r12d
jle 0x18000586f
mov rsi, r12
mov rax, qword [rdi + 0x5c48]
cmp dword [rsi + rax + 4], 6
jne 0x180005861
movsxd rdx, ebx
mov rcx, rdi
shl rdx, 5
add rdx, rax
call qword [rsi + rax + 0x10]
inc ebx
add rsi, 0x20
cmp ebx, dword [rdi + 0x5c40]
jl 0x180005842
mov esi, r12d
cmp dword [rdi + 0x3e78], r12d
jle 0x1800058c7
mov r14, r12
nop
mov rax, qword [rdi + 0x3e80]
mov rbx, qword [r14 + rax]
test rbx, rbx
je 0x1800058b9
mov rcx, rbx
call fcn.180006660
mov rax, qword [0x180067240]
test rax, rax
je 0x1800058aa
dec dword [rax + 0xec]
mov rdx, qword [0x180067248]
mov rcx, rbx
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
inc esi
add r14, 8
cmp esi, dword [rdi + 0x3e78]
jl 0x180005880
mov rcx, qword [rdi + 0x3e80]
test rcx, rcx
je 0x1800058ff
mov rax, qword [0x180067240]
mov qword [rdi + 0x3e78], r12
test rax, rax
je 0x1800058ec
dec dword [rax + 0xec]
mov rdx, qword [0x180067248]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x3e80], r12
mov rcx, qword [rdi + 0x3e90]
test rcx, rcx
je 0x180005937
mov rax, qword [0x180067240]
mov qword [rdi + 0x3e88], r12
test rax, rax
je 0x180005924
dec dword [rax + 0xec]
mov rdx, qword [0x180067248]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x3e90], r12
mov rcx, qword [rdi + 0x3ea0]
test rcx, rcx
je 0x18000596f
mov rax, qword [0x180067240]
mov qword [rdi + 0x3e98], r12
test rax, rax
je 0x18000595c
dec dword [rax + 0xec]
mov rdx, qword [0x180067248]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x3ea0], r12
mov qword [rdi + 0x3ed8], r12
mov rcx, qword [rdi + 0x3eb0]
test rcx, rcx
je 0x1800059ae
mov rax, qword [0x180067240]
mov qword [rdi + 0x3ea8], r12
test rax, rax
je 0x18000599b
dec dword [rax + 0xec]
mov rdx, qword [0x180067248]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x3eb0], r12
mov rcx, qword [rdi + 0x3ec0]
test rcx, rcx
je 0x1800059e6
mov rax, qword [0x180067240]
mov qword [rdi + 0x3eb8], r12
test rax, rax
je 0x1800059d3
dec dword [rax + 0xec]
mov rdx, qword [0x180067248]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x3ec0], r12
lea rcx, [rdi + 0x4610]
mov qword [rdi + 0x48c0], r12
mov qword [rdi + 0x3ee8], r12
mov qword [rdi + 0x3ee0], r12
mov qword [rdi + 0x3f70], r12
mov qword [rdi + 0x3f58], r12
mov qword [rdi + 0x3ef0], r12
call fcn.180001770
mov rcx, qword [rdi + 0x4830]
test rcx, rcx
je 0x180005a54
mov rax, qword [0x180067240]
mov qword [rdi + 0x4828], r12
test rax, rax
je 0x180005a41
dec dword [rax + 0xec]
mov rdx, qword [0x180067248]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4830], r12
mov rcx, qword [rdi + 0x4840]
test rcx, rcx
je 0x180005a8c
mov rax, qword [0x180067240]
mov qword [rdi + 0x4838], r12
test rax, rax
je 0x180005a79
dec dword [rax + 0xec]
mov rdx, qword [0x180067248]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4840], r12
mov rcx, qword [rdi + 0x4850]
test rcx, rcx
je 0x180005ac4
mov rax, qword [0x180067240]
mov qword [rdi + 0x4848], r12
test rax, rax
je 0x180005ab1
dec dword [rax + 0xec]
mov rdx, qword [0x180067248]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4850], r12
mov rcx, qword [rdi + 0x4890]
test rcx, rcx
je 0x180005afc
mov rax, qword [0x180067240]
mov qword [rdi + 0x4888], r12
test rax, rax
je 0x180005ae9
dec dword [rax + 0xec]
mov rdx, qword [0x180067248]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4890], r12
mov rcx, qword [rdi + 0x48a0]
test rcx, rcx
je 0x180005b34
mov rax, qword [0x180067240]
mov qword [rdi + 0x4898], r12
test rax, rax
je 0x180005b21
dec dword [rax + 0xec]
mov rdx, qword [0x180067248]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x48a0], r12
mov r14d, r12d
mov qword [rsp + 0x58], rbp
cmp dword [rdi + 0x48b0], r12d
jle 0x180005c2c
mov qword [rsp + 0x20], r15
mov r15, r12
mov rax, qword [rdi + 0x48b8]
mov rbp, qword [r15 + rax]
test rbp, rbp
je 0x180005c13
mov rbx, qword [rbp + 0x38]
test rbx, rbx
je 0x180005b97
mov rcx, rbx
call fcn.180001550
mov rax, qword [0x180067240]
test rax, rax
je 0x180005b88
dec dword [rax + 0xec]
mov rdx, qword [0x180067248]
mov rcx, rbx
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov rbx, qword [rbp + 0x40]
test rbx, rbx
je 0x180005bc9
mov rcx, rbx
call fcn.180001550
mov rax, qword [0x180067240]
test rax, rax
je 0x180005bba
dec dword [rax + 0xec]
mov rdx, qword [0x180067248]
mov rcx, rbx
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov ebx, 2
lea rsi, [rbp + 0x98]
nop word [rax + rax]
sub rsi, 0x10
mov rcx, rsi
call fcn.18001a6c0
sub rbx, 1
jne 0x180005be0
mov rax, qword [0x180067240]
test rax, rax
je 0x180005c04
dec dword [rax + 0xec]
mov rdx, qword [0x180067248]
mov rcx, rbp
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
inc r14d
add r15, 8
cmp r14d, dword [rdi + 0x48b0]
jl 0x180005b51
mov r15, qword [rsp + 0x20]
mov rcx, qword [rdi + 0x48b8]
mov r14, qword [rsp + 0x28]
test rcx, rcx
je 0x180005c69
mov rax, qword [0x180067240]
mov qword [rdi + 0x48b0], r12
test rax, rax
je 0x180005c56
dec dword [rax + 0xec]
mov rdx, qword [0x180067248]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x48b8], r12
lea rcx, [rdi + 0x4ba8]
call fcn.180019fc0
mov rcx, qword [rdi + 0x4bd8]
test rcx, rcx
je 0x180005cad
mov rax, qword [0x180067240]
mov qword [rdi + 0x4bd0], r12
test rax, rax
je 0x180005c9a
dec dword [rax + 0xec]
mov rdx, qword [0x180067248]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4bd8], r12
mov rcx, qword [rdi + 0x4be8]
test rcx, rcx
je 0x180005ce5
mov rax, qword [0x180067240]
mov qword [rdi + 0x4be0], r12
test rax, rax
je 0x180005cd2
dec dword [rax + 0xec]
mov rdx, qword [0x180067248]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4be8], r12
mov ebx, r12d
cmp dword [rdi + 0x4b28], r12d
jle 0x180005d3d
mov rsi, r12
nop dword [rax]
nop dword [rax + rax]
mov rax, qword [rdi + 0x4b30]
mov rcx, qword [rsi + rax + 0x20]
test rcx, rcx
je 0x180005d2f
mov rax, qword [0x180067240]
test rax, rax
je 0x180005d23
dec dword [rax + 0xec]
mov rdx, qword [0x180067248]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
inc ebx
add rsi, 0x28
cmp ebx, dword [rdi + 0x4b28]
jl 0x180005d00
mov rcx, qword [rdi + 0x4b30]
test rcx, rcx
je 0x180005d75
mov rax, qword [0x180067240]
mov qword [rdi + 0x4b28], r12
test rax, rax
je 0x180005d62
dec dword [rax + 0xec]
mov rdx, qword [0x180067248]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4b30], r12
lea rcx, [rdi + 0x4b58]
call fcn.18001a160
mov esi, r12d
cmp dword [rdi + 0x4b48], r12d
jle 0x180005dd9
mov rbp, r12
mov rbx, qword [rdi + 0x4b50]
lea rcx, [rbx + 0x10]
add rcx, rbp
call fcn.180026110
mov rcx, qword [rbx + rbp + 0x20]
test rcx, rcx
je 0x180005dcb
mov rax, qword [0x180067240]
test rax, rax
je 0x180005dbf
dec dword [rax + 0xec]
mov rdx, qword [0x180067248]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
inc esi
add rbp, 0x70
cmp esi, dword [rdi + 0x4b48]
jl 0x180005d90
mov rcx, qword [rdi + 0x4b50]
mov rsi, qword [rsp + 0x60]
mov rbp, qword [rsp + 0x58]
test rcx, rcx
je 0x180005e1b
mov rax, qword [0x180067240]
mov qword [rdi + 0x4b48], r12
test rax, rax
je 0x180005e08
dec dword [rax + 0xec]
mov rdx, qword [0x180067248]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4b50], r12
mov rcx, qword [rdi + 0x4b98]
test rcx, rcx
je 0x180005e53
mov rax, qword [0x180067240]
mov qword [rdi + 0x4b90], r12
test rax, rax
je 0x180005e40
dec dword [rax + 0xec]
mov rdx, qword [0x180067248]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4b98], r12
mov rcx, qword [rdi + 0x5bc0]
test rcx, rcx
je 0x180005e8b
mov rax, qword [0x180067240]
mov qword [rdi + 0x5bb8], r12
test rax, rax
je 0x180005e78
dec dword [rax + 0xec]
mov rdx, qword [0x180067248]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x5bc0], r12
mov rcx, qword [rdi + 0x5bd0]
test rcx, rcx
je 0x180005ec3
mov rax, qword [0x180067240]
mov qword [rdi + 0x5bc8], r12
test rax, rax
je 0x180005eb0
dec dword [rax + 0xec]
mov rdx, qword [0x180067248]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x5bd0], r12
mov rcx, qword [rdi + 0x4c38]
test rcx, rcx
je 0x180005efb
mov rax, qword [0x180067240]
mov qword [rdi + 0x4c30], r12
test rax, rax
je 0x180005ee8
dec dword [rax + 0xec]
mov rdx, qword [0x180067248]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4c38], r12
mov rcx, qword [rdi + 0x4c48]
test rcx, rcx
je 0x180005f33
mov rax, qword [0x180067240]
mov qword [rdi + 0x4c40], r12
test rax, rax
je 0x180005f20
dec dword [rax + 0xec]
mov rdx, qword [0x180067248]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4c48], r12
mov rcx, qword [rdi + 0x4c58]
test rcx, rcx
je 0x180005f6b
mov rax, qword [0x180067240]
mov qword [rdi + 0x4c50], r12
test rax, rax
je 0x180005f58
dec dword [rax + 0xec]
mov rdx, qword [0x180067248]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4c58], r12
mov dword [rdi + 0x5aa8], r12d
mov rcx, qword [rdi + 0x5ab8]
test rcx, rcx
je 0x180005faa
mov rax, qword [0x180067240]
mov qword [rdi + 0x5ab0], r12
test rax, rax
je 0x180005f97
dec dword [rax + 0xec]
mov rdx, qword [0x180067248]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x5ab8], r12
mov rcx, qword [rdi + 0x5c28]
test rcx, rcx
je 0x180005fe2
mov rax, qword [0x180067240]
mov qword [rdi + 0x5c20], r12
test rax, rax
je 0x180005fcf
dec dword [rax + 0xec]
mov rdx, qword [0x180067248]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x5c28], r12
mov rcx, qword [rdi + 0x5c18]
test rcx, rcx
je 0x18000601a
mov rax, qword [0x180067240]
mov qword [rdi + 0x5c10], r12
test rax, rax
je 0x180006007
dec dword [rax + 0xec]
mov rdx, qword [0x180067248]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x5c18], r12
cmp qword [rdi + 0x5ca0], r12
je 0x18000604a
mov rbx, qword [rdi + 0x5ca0]
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
cmp rbx, rax
je 0x180006043
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov qword [rdi + 0x5ca0], r12
mov rcx, qword [rdi + 0x5cb0]
test rcx, rcx
je 0x180006082
mov rax, qword [0x180067240]
mov qword [rdi + 0x5ca8], r12
test rax, rax
je 0x18000606f
dec dword [rax + 0xec]
mov rdx, qword [0x180067248]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x5cb0], r12
mov rcx, qword [rdi + 0x5ce8]
test rcx, rcx
je 0x1800060ba
mov rax, qword [0x180067240]
mov qword [rdi + 0x5ce0], r12
test rax, rax
je 0x1800060a7
dec dword [rax + 0xec]
mov rdx, qword [0x180067248]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x5ce8], r12
mov rcx, qword [rdi + 0x5cf8]
test rcx, rcx
je 0x1800060f2
mov rax, qword [0x180067240]
mov qword [rdi + 0x5cf0], r12
test rax, rax
je 0x1800060df
dec dword [rax + 0xec]
mov rdx, qword [0x180067248]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x5cf8], r12
mov dword [rdi + 0x5d00], r12d
mov byte [rdi], r12b
add rsp, 0x30
pop r12
pop rdi
pop rbx
ret