Function at 0x140005490
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 [0x1400b33c0]
mov rdi, rax
mov rcx, qword [rax + 0x58]
test rcx, rcx
je 0x1400054fe
cmp byte [rax + 1], 0
je 0x1400054fe
mov byte [rcx + 0x18], 0
mov rbx, qword [rax + 0x58]
test rbx, rbx
je 0x1400054fe
mov rcx, rbx
call fcn.1400292f0
mov rax, qword [0x1400b33c0]
test rax, rax
je 0x1400054e8
dec dword [rax + 0xf4]
mov rdx, qword [0x1400b33b0]
mov rcx, rbx
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov rax, qword [0x1400b33c0]
xor r15d, r15d
mov qword [rdi + 0x58], r15
mov rcx, qword [rdi + 0x3c68]
test rcx, rcx
je 0x14000553d
mov qword [rdi + 0x3c60], r15
test rax, rax
je 0x140005523
dec dword [rax + 0xf4]
mov rdx, qword [0x1400b33b0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x3c68], r15
mov rax, qword [0x1400b33c0]
cmp byte [rdi], r15b
je 0x140005e26
cmp byte [rdi + 0x5bb9], r15b
je 0x1400055a7
mov rbx, qword [rdi + 0x20]
test rbx, rbx
je 0x1400055a7
mov dword [rax + 0x5bbc], r15d
mov qword [rsp + 0x40], r15
lea rcx, [rsp + 0x40]
call fcn.14001adf0
mov rsi, rax
lea rdx, [0x14005477c]
mov rcx, rbx
call fcn.1400036a0
mov rbx, rax
test rax, rax
je 0x1400055a7
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.140005e40
mov esi, r15d
cmp dword [rdi + 0x3e68], r15d
jle 0x140005617
mov r14, r15
nop dword [rax]
nop word [rax + rax]
mov rax, qword [rdi + 0x3e70]
mov rbx, qword [r14 + rax]
test rbx, rbx
je 0x140005609
mov rcx, rbx
call fcn.140006460
mov rax, qword [0x1400b33c0]
test rax, rax
je 0x1400055fa
dec dword [rax + 0xf4]
mov rdx, qword [0x1400b33b0]
mov rcx, rbx
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
inc esi
add r14, 8
cmp esi, dword [rdi + 0x3e68]
jl 0x1400055d0
mov rcx, qword [rdi + 0x3e70]
test rcx, rcx
je 0x14000564f
mov qword [rdi + 0x3e68], r15
mov rax, qword [0x1400b33c0]
test rax, rax
je 0x14000563c
dec dword [rax + 0xf4]
mov rdx, qword [0x1400b33b0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x3e70], r15
mov rcx, qword [rdi + 0x3e80]
test rcx, rcx
je 0x140005687
mov qword [rdi + 0x3e78], r15
mov rax, qword [0x1400b33c0]
test rax, rax
je 0x140005674
dec dword [rax + 0xf4]
mov rdx, qword [0x1400b33b0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x3e80], r15
mov rcx, qword [rdi + 0x3e90]
test rcx, rcx
je 0x1400056bf
mov qword [rdi + 0x3e88], r15
mov rax, qword [0x1400b33c0]
test rax, rax
je 0x1400056ac
dec dword [rax + 0xf4]
mov rdx, qword [0x1400b33b0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x3e90], r15
mov qword [rdi + 0x3ec8], r15
mov rcx, qword [rdi + 0x3ea0]
test rcx, rcx
je 0x1400056fe
mov qword [rdi + 0x3e98], r15
mov rax, qword [0x1400b33c0]
test rax, rax
je 0x1400056eb
dec dword [rax + 0xf4]
mov rdx, qword [0x1400b33b0]
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 0x140005736
mov qword [rdi + 0x3ea8], r15
mov rax, qword [0x1400b33c0]
test rax, rax
je 0x140005723
dec dword [rax + 0xf4]
mov rdx, qword [0x1400b33b0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x3eb0], r15
mov qword [rdi + 0x48a8], r15
mov qword [rdi + 0x3ed8], r15
mov qword [rdi + 0x3ed0], r15
mov qword [rdi + 0x3f60], r15
mov qword [rdi + 0x3f48], r15
mov qword [rdi + 0x3ee0], r15
lea rcx, [rdi + 0x4600]
call fcn.1400015c0
mov rcx, qword [rdi + 0x4818]
test rcx, rcx
je 0x1400057a4
mov qword [rdi + 0x4810], r15
mov rax, qword [0x1400b33c0]
test rax, rax
je 0x140005791
dec dword [rax + 0xf4]
mov rdx, qword [0x1400b33b0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4818], r15
mov rcx, qword [rdi + 0x4828]
test rcx, rcx
je 0x1400057dc
mov qword [rdi + 0x4820], r15
mov rax, qword [0x1400b33c0]
test rax, rax
je 0x1400057c9
dec dword [rax + 0xf4]
mov rdx, qword [0x1400b33b0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4828], r15
mov rcx, qword [rdi + 0x4838]
test rcx, rcx
je 0x140005814
mov qword [rdi + 0x4830], r15
mov rax, qword [0x1400b33c0]
test rax, rax
je 0x140005801
dec dword [rax + 0xf4]
mov rdx, qword [0x1400b33b0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4838], r15
mov rcx, qword [rdi + 0x4878]
test rcx, rcx
je 0x14000584c
mov qword [rdi + 0x4870], r15
mov rax, qword [0x1400b33c0]
test rax, rax
je 0x140005839
dec dword [rax + 0xf4]
mov rdx, qword [0x1400b33b0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4878], r15
mov rcx, qword [rdi + 0x4888]
test rcx, rcx
je 0x140005884
mov qword [rdi + 0x4880], r15
mov rax, qword [0x1400b33c0]
test rax, rax
je 0x140005871
dec dword [rax + 0xf4]
mov rdx, qword [0x1400b33b0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4888], r15
mov ebp, r15d
cmp dword [rdi + 0x4898], r15d
jle 0x140005966
mov r14, r15
nop word [rax + rax]
mov rax, qword [rdi + 0x48a0]
mov rbx, qword [r14 + rax]
test rbx, rbx
je 0x140005954
mov rsi, qword [rbx + 0x38]
test rsi, rsi
je 0x1400058e6
mov rcx, rsi
call fcn.140001390
mov rax, qword [0x1400b33c0]
test rax, rax
je 0x1400058d7
dec dword [rax + 0xf4]
mov rdx, qword [0x1400b33b0]
mov rcx, rsi
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov rsi, qword [rbx + 0x40]
test rsi, rsi
je 0x140005919
mov rcx, rsi
call fcn.140001390
mov rax, qword [0x1400b33c0]
test rax, rax
je 0x140005909
dec dword [rax + 0xf4]
mov rdx, qword [0x1400b33b0]
mov rcx, rsi
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
nop
lea rcx, [rbx + 0x78]
lea r9, [0x14001c090]
mov edx, 0x10
lea r8d, [rdx - 0xe]
call fcn.14004bfcc
nop
mov rax, qword [0x1400b33c0]
test rax, rax
je 0x140005945
dec dword [rax + 0xf4]
mov rdx, qword [0x1400b33b0]
mov rcx, rbx
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
inc ebp
add r14, 8
cmp ebp, dword [rdi + 0x4898]
jl 0x1400058a0
mov rcx, qword [rdi + 0x48a0]
test rcx, rcx
je 0x14000599e
mov qword [rdi + 0x4898], r15
mov rax, qword [0x1400b33c0]
test rax, rax
je 0x14000598b
dec dword [rax + 0xf4]
mov rdx, qword [0x1400b33b0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x48a0], r15
lea rcx, [rdi + 0x4b78]
call fcn.14001c0d0
mov rcx, qword [rdi + 0x4ba8]
test rcx, rcx
je 0x1400059e2
mov qword [rdi + 0x4ba0], r15
mov rax, qword [0x1400b33c0]
test rax, rax
je 0x1400059cf
dec dword [rax + 0xf4]
mov rdx, qword [0x1400b33b0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4ba8], r15
mov rcx, qword [rdi + 0x4bb8]
test rcx, rcx
je 0x140005a1a
mov qword [rdi + 0x4bb0], r15
mov rax, qword [0x1400b33c0]
test rax, rax
je 0x140005a07
dec dword [rax + 0xf4]
mov rdx, qword [0x1400b33b0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4bb8], r15
mov ebx, r15d
cmp dword [rdi + 0x4af8], r15d
jle 0x140005a6e
mov rsi, r15
nop dword [rax]
mov rax, qword [rdi + 0x4b00]
mov rcx, qword [rsi + rax + 0x20]
test rcx, rcx
je 0x140005a60
mov rax, qword [0x1400b33c0]
test rax, rax
je 0x140005a53
dec dword [rax + 0xf4]
mov rdx, qword [0x1400b33b0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
nop
inc ebx
add rsi, 0x28
cmp ebx, dword [rdi + 0x4af8]
jl 0x140005a30
mov rcx, qword [rdi + 0x4b00]
test rcx, rcx
je 0x140005aa6
mov qword [rdi + 0x4af8], r15
mov rax, qword [0x1400b33c0]
test rax, rax
je 0x140005a93
dec dword [rax + 0xf4]
mov rdx, qword [0x1400b33b0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4b00], r15
lea rcx, [rdi + 0x4b28]
call fcn.14001c2c0
mov esi, r15d
cmp dword [rdi + 0x4b18], r15d
jle 0x140005b0c
mov rbp, r15
mov rbx, qword [rdi + 0x4b20]
lea rcx, [rbx + 0x10]
add rcx, rbp
call fcn.140028b60
nop
mov rcx, qword [rbx + rbp + 0x20]
test rcx, rcx
je 0x140005afe
mov rax, qword [0x1400b33c0]
test rax, rax
je 0x140005af1
dec dword [rax + 0xf4]
mov rdx, qword [0x1400b33b0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
nop
inc esi
add rbp, 0x70
cmp esi, dword [rdi + 0x4b18]
jl 0x140005ac1
mov rcx, qword [rdi + 0x4b20]
test rcx, rcx
je 0x140005b44
mov qword [rdi + 0x4b18], r15
mov rax, qword [0x1400b33c0]
test rax, rax
je 0x140005b31
dec dword [rax + 0xf4]
mov rdx, qword [0x1400b33b0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4b20], r15
mov rcx, qword [rdi + 0x4b68]
test rcx, rcx
je 0x140005b7c
mov qword [rdi + 0x4b60], r15
mov rax, qword [0x1400b33c0]
test rax, rax
je 0x140005b69
dec dword [rax + 0xf4]
mov rdx, qword [0x1400b33b0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4b68], r15
mov rcx, qword [rdi + 0x5b80]
test rcx, rcx
je 0x140005bb4
mov qword [rdi + 0x5b78], r15
mov rax, qword [0x1400b33c0]
test rax, rax
je 0x140005ba1
dec dword [rax + 0xf4]
mov rdx, qword [0x1400b33b0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x5b80], r15
mov rcx, qword [rdi + 0x5b90]
test rcx, rcx
je 0x140005bec
mov qword [rdi + 0x5b88], r15
mov rax, qword [0x1400b33c0]
test rax, rax
je 0x140005bd9
dec dword [rax + 0xf4]
mov rdx, qword [0x1400b33b0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x5b90], r15
mov rcx, qword [rdi + 0x4bf8]
test rcx, rcx
je 0x140005c24
mov qword [rdi + 0x4bf0], r15
mov rax, qword [0x1400b33c0]
test rax, rax
je 0x140005c11
dec dword [rax + 0xf4]
mov rdx, qword [0x1400b33b0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4bf8], r15
mov rcx, qword [rdi + 0x4c08]
test rcx, rcx
je 0x140005c5c
mov qword [rdi + 0x4c00], r15
mov rax, qword [0x1400b33c0]
test rax, rax
je 0x140005c49
dec dword [rax + 0xf4]
mov rdx, qword [0x1400b33b0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4c08], r15
mov rcx, qword [rdi + 0x4c18]
test rcx, rcx
je 0x140005c94
mov qword [rdi + 0x4c10], r15
mov rax, qword [0x1400b33c0]
test rax, rax
je 0x140005c81
dec dword [rax + 0xf4]
mov rdx, qword [0x1400b33b0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4c18], r15
mov dword [rdi + 0x5a68], r15d
mov rcx, qword [rdi + 0x5a78]
test rcx, rcx
je 0x140005cd3
mov qword [rdi + 0x5a70], r15
mov rax, qword [0x1400b33c0]
test rax, rax
je 0x140005cc0
dec dword [rax + 0xf4]
mov rdx, qword [0x1400b33b0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x5a78], r15
mov rcx, qword [rdi + 0x5be8]
test rcx, rcx
je 0x140005d0b
mov qword [rdi + 0x5be0], r15
mov rax, qword [0x1400b33c0]
test rax, rax
je 0x140005cf8
dec dword [rax + 0xf4]
mov rdx, qword [0x1400b33b0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x5be8], r15
mov rcx, qword [rdi + 0x5bd8]
test rcx, rcx
je 0x140005d43
mov qword [rdi + 0x5bd0], r15
mov rax, qword [0x1400b33c0]
test rax, rax
je 0x140005d30
dec dword [rax + 0xf4]
mov rdx, qword [0x1400b33b0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x5bd8], r15
cmp qword [rdi + 0x5c58], 0
je 0x140005d74
mov rbx, qword [rdi + 0x5c58]
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
cmp rbx, rax
je 0x140005d6d
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov qword [rdi + 0x5c58], r15
mov rcx, qword [rdi + 0x5c68]
test rcx, rcx
je 0x140005dac
mov qword [rdi + 0x5c60], r15
mov rax, qword [0x1400b33c0]
test rax, rax
je 0x140005d99
dec dword [rax + 0xf4]
mov rdx, qword [0x1400b33b0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x5c68], r15
mov rcx, qword [rdi + 0x5ca0]
test rcx, rcx
je 0x140005de4
mov qword [rdi + 0x5c98], r15
mov rax, qword [0x1400b33c0]
test rax, rax
je 0x140005dd1
dec dword [rax + 0xf4]
mov rdx, qword [0x1400b33b0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x5ca0], r15
mov rcx, qword [rdi + 0x5cb0]
test rcx, rcx
je 0x140005e1c
mov qword [rdi + 0x5ca8], r15
mov rax, qword [0x1400b33c0]
test rax, rax
je 0x140005e09
dec dword [rax + 0xf4]
mov rdx, qword [0x1400b33b0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x5cb0], r15
mov dword [rdi + 0x5cb8], 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