Function at 0x140004e30
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 rdi, qword [0x1400476a8]
mov rax, qword [rdi + 0x58]
test rax, rax
je 0x140004f1c
cmp byte [rdi + 1], 0
je 0x140004f1c
mov byte [rax + 0x18], 0
mov rbx, qword [rdi + 0x58]
test rbx, rbx
je 0x140004f1c
mov rcx, rbx
call fcn.1400252a0
nop
mov rcx, qword [rbx + 0x80]
test rcx, rcx
je 0x140004eab
mov rax, qword [0x1400476a8]
test rax, rax
je 0x140004e9e
dec dword [rax + 0xf4]
mov rdx, qword [0x140047698]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
nop
mov rcx, qword [rbx + 0x70]
test rcx, rcx
je 0x140004ed3
mov rax, qword [0x1400476a8]
test rax, rax
je 0x140004ec6
dec dword [rax + 0xf4]
mov rdx, qword [0x140047698]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
nop
mov rcx, qword [rbx + 0x60]
test rcx, rcx
je 0x140004efb
mov rax, qword [0x1400476a8]
test rax, rax
je 0x140004eee
dec dword [rax + 0xf4]
mov rdx, qword [0x140047698]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
nop
mov rax, qword [0x1400476a8]
test rax, rax
je 0x140004f0d
dec dword [rax + 0xf4]
mov rdx, qword [0x140047698]
mov rcx, rbx
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
xor r15d, r15d
mov qword [rdi + 0x58], r15
mov rcx, qword [rdi + 0x3c48]
test rcx, rcx
je 0x140004f5b
mov qword [rdi + 0x3c40], r15
mov rax, qword [0x1400476a8]
test rax, rax
je 0x140004f48
dec dword [rax + 0xf4]
mov rdx, qword [0x140047698]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x3c48], r15
cmp byte [rdi], r15b
je 0x140005876
cmp byte [rdi + 0x5bc1], r15b
je 0x140004fcc
mov rbx, qword [rdi + 0x20]
test rbx, rbx
je 0x140004fcc
mov rax, qword [0x1400476a8]
mov dword [rax + 0x5bc4], r15d
mov qword [rsp + 0x40], r15
lea rcx, [rsp + 0x40]
call fcn.140018030
mov rsi, rax
lea rdx, [0x14003b3e4]
mov rcx, rbx
call fcn.140002f40
mov rbx, rax
test rax, rax
je 0x140004fcc
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 ebx, r15d
cmp dword [rdi + 0x5c08], r15d
jle 0x140005010
mov rsi, r15
nop dword [rax + rax]
mov rcx, qword [rdi + 0x5c10]
cmp dword [rsi + rcx + 4], 6
jne 0x140005002
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 + 0x5c08]
jl 0x140004fe0
mov esi, r15d
cmp dword [rdi + 0x3e70], r15d
jle 0x140005067
mov r14, r15
nop
mov rax, qword [rdi + 0x3e78]
mov rbx, qword [r14 + rax]
test rbx, rbx
je 0x140005059
mov rcx, rbx
call fcn.140005d80
mov rax, qword [0x1400476a8]
test rax, rax
je 0x14000504a
dec dword [rax + 0xf4]
mov rdx, qword [0x140047698]
mov rcx, rbx
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
inc esi
add r14, 8
cmp esi, dword [rdi + 0x3e70]
jl 0x140005020
mov rcx, qword [rdi + 0x3e78]
test rcx, rcx
je 0x14000509f
mov qword [rdi + 0x3e70], r15
mov rax, qword [0x1400476a8]
test rax, rax
je 0x14000508c
dec dword [rax + 0xf4]
mov rdx, qword [0x140047698]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x3e78], r15
mov rcx, qword [rdi + 0x3e88]
test rcx, rcx
je 0x1400050d7
mov qword [rdi + 0x3e80], r15
mov rax, qword [0x1400476a8]
test rax, rax
je 0x1400050c4
dec dword [rax + 0xf4]
mov rdx, qword [0x140047698]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x3e88], r15
mov rcx, qword [rdi + 0x3e98]
test rcx, rcx
je 0x14000510f
mov qword [rdi + 0x3e90], r15
mov rax, qword [0x1400476a8]
test rax, rax
je 0x1400050fc
dec dword [rax + 0xf4]
mov rdx, qword [0x140047698]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x3e98], r15
mov qword [rdi + 0x3ed0], r15
mov rcx, qword [rdi + 0x3ea8]
test rcx, rcx
je 0x14000514e
mov qword [rdi + 0x3ea0], r15
mov rax, qword [0x1400476a8]
test rax, rax
je 0x14000513b
dec dword [rax + 0xf4]
mov rdx, qword [0x140047698]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x3ea8], r15
mov rcx, qword [rdi + 0x3eb8]
test rcx, rcx
je 0x140005186
mov qword [rdi + 0x3eb0], r15
mov rax, qword [0x1400476a8]
test rax, rax
je 0x140005173
dec dword [rax + 0xf4]
mov rdx, qword [0x140047698]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x3eb8], r15
mov qword [rdi + 0x48b0], r15
mov qword [rdi + 0x3ee0], r15
mov qword [rdi + 0x3ed8], r15
mov qword [rdi + 0x3f68], r15
mov qword [rdi + 0x3f50], r15
mov qword [rdi + 0x3ee8], r15
lea rcx, [rdi + 0x4608]
call fcn.140001260
mov rcx, qword [rdi + 0x4820]
test rcx, rcx
je 0x1400051f4
mov qword [rdi + 0x4818], r15
mov rax, qword [0x1400476a8]
test rax, rax
je 0x1400051e1
dec dword [rax + 0xf4]
mov rdx, qword [0x140047698]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4820], r15
mov rcx, qword [rdi + 0x4830]
test rcx, rcx
je 0x14000522c
mov qword [rdi + 0x4828], r15
mov rax, qword [0x1400476a8]
test rax, rax
je 0x140005219
dec dword [rax + 0xf4]
mov rdx, qword [0x140047698]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4830], r15
mov rcx, qword [rdi + 0x4840]
test rcx, rcx
je 0x140005264
mov qword [rdi + 0x4838], r15
mov rax, qword [0x1400476a8]
test rax, rax
je 0x140005251
dec dword [rax + 0xf4]
mov rdx, qword [0x140047698]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4840], r15
mov rcx, qword [rdi + 0x4880]
test rcx, rcx
je 0x14000529c
mov qword [rdi + 0x4878], r15
mov rax, qword [0x1400476a8]
test rax, rax
je 0x140005289
dec dword [rax + 0xf4]
mov rdx, qword [0x140047698]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4880], r15
mov rcx, qword [rdi + 0x4890]
test rcx, rcx
je 0x1400052d4
mov qword [rdi + 0x4888], r15
mov rax, qword [0x1400476a8]
test rax, rax
je 0x1400052c1
dec dword [rax + 0xf4]
mov rdx, qword [0x140047698]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4890], r15
mov ebp, r15d
cmp dword [rdi + 0x48a0], r15d
jle 0x1400053b6
mov r14, r15
nop word [rax + rax]
mov rax, qword [rdi + 0x48a8]
mov rbx, qword [r14 + rax]
test rbx, rbx
je 0x1400053a4
mov rsi, qword [rbx + 0x38]
test rsi, rsi
je 0x140005336
mov rcx, rsi
call fcn.140001030
mov rax, qword [0x1400476a8]
test rax, rax
je 0x140005327
dec dword [rax + 0xf4]
mov rdx, qword [0x140047698]
mov rcx, rsi
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov rsi, qword [rbx + 0x40]
test rsi, rsi
je 0x140005369
mov rcx, rsi
call fcn.140001030
mov rax, qword [0x1400476a8]
test rax, rax
je 0x140005359
dec dword [rax + 0xf4]
mov rdx, qword [0x140047698]
mov rcx, rsi
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
nop
lea rcx, [rbx + 0x78]
lea r9, [0x140019100]
mov edx, 0x10
lea r8d, [rdx - 0xe]
call fcn.14003824c
nop
mov rax, qword [0x1400476a8]
test rax, rax
je 0x140005395
dec dword [rax + 0xf4]
mov rdx, qword [0x140047698]
mov rcx, rbx
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
inc ebp
add r14, 8
cmp ebp, dword [rdi + 0x48a0]
jl 0x1400052f0
mov rcx, qword [rdi + 0x48a8]
test rcx, rcx
je 0x1400053ee
mov qword [rdi + 0x48a0], r15
mov rax, qword [0x1400476a8]
test rax, rax
je 0x1400053db
dec dword [rax + 0xf4]
mov rdx, qword [0x140047698]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x48a8], r15
lea rcx, [rdi + 0x4b80]
call fcn.140019140
mov rcx, qword [rdi + 0x4bb0]
test rcx, rcx
je 0x140005432
mov qword [rdi + 0x4ba8], r15
mov rax, qword [0x1400476a8]
test rax, rax
je 0x14000541f
dec dword [rax + 0xf4]
mov rdx, qword [0x140047698]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4bb0], r15
mov rcx, qword [rdi + 0x4bc0]
test rcx, rcx
je 0x14000546a
mov qword [rdi + 0x4bb8], r15
mov rax, qword [0x1400476a8]
test rax, rax
je 0x140005457
dec dword [rax + 0xf4]
mov rdx, qword [0x140047698]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4bc0], r15
mov ebx, r15d
cmp dword [rdi + 0x4b00], r15d
jle 0x1400054be
mov rsi, r15
nop dword [rax]
mov rax, qword [rdi + 0x4b08]
mov rcx, qword [rsi + rax + 0x20]
test rcx, rcx
je 0x1400054b0
mov rax, qword [0x1400476a8]
test rax, rax
je 0x1400054a3
dec dword [rax + 0xf4]
mov rdx, qword [0x140047698]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
nop
inc ebx
add rsi, 0x28
cmp ebx, dword [rdi + 0x4b00]
jl 0x140005480
mov rcx, qword [rdi + 0x4b08]
test rcx, rcx
je 0x1400054f6
mov qword [rdi + 0x4b00], r15
mov rax, qword [0x1400476a8]
test rax, rax
je 0x1400054e3
dec dword [rax + 0xf4]
mov rdx, qword [0x140047698]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4b08], r15
lea rcx, [rdi + 0x4b30]
call fcn.1400192e0
mov esi, r15d
cmp dword [rdi + 0x4b20], r15d
jle 0x14000555c
mov rbp, r15
mov rbx, qword [rdi + 0x4b28]
lea rcx, [rbx + 0x10]
add rcx, rbp
call fcn.140024c50
nop
mov rcx, qword [rbx + rbp + 0x20]
test rcx, rcx
je 0x14000554e
mov rax, qword [0x1400476a8]
test rax, rax
je 0x140005541
dec dword [rax + 0xf4]
mov rdx, qword [0x140047698]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
nop
inc esi
add rbp, 0x70
cmp esi, dword [rdi + 0x4b20]
jl 0x140005511
mov rcx, qword [rdi + 0x4b28]
test rcx, rcx
je 0x140005594
mov qword [rdi + 0x4b20], r15
mov rax, qword [0x1400476a8]
test rax, rax
je 0x140005581
dec dword [rax + 0xf4]
mov rdx, qword [0x140047698]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4b28], r15
mov rcx, qword [rdi + 0x4b70]
test rcx, rcx
je 0x1400055cc
mov qword [rdi + 0x4b68], r15
mov rax, qword [0x1400476a8]
test rax, rax
je 0x1400055b9
dec dword [rax + 0xf4]
mov rdx, qword [0x140047698]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4b70], r15
mov rcx, qword [rdi + 0x5b88]
test rcx, rcx
je 0x140005604
mov qword [rdi + 0x5b80], r15
mov rax, qword [0x1400476a8]
test rax, rax
je 0x1400055f1
dec dword [rax + 0xf4]
mov rdx, qword [0x140047698]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x5b88], r15
mov rcx, qword [rdi + 0x5b98]
test rcx, rcx
je 0x14000563c
mov qword [rdi + 0x5b90], r15
mov rax, qword [0x1400476a8]
test rax, rax
je 0x140005629
dec dword [rax + 0xf4]
mov rdx, qword [0x140047698]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x5b98], r15
mov rcx, qword [rdi + 0x4c00]
test rcx, rcx
je 0x140005674
mov qword [rdi + 0x4bf8], r15
mov rax, qword [0x1400476a8]
test rax, rax
je 0x140005661
dec dword [rax + 0xf4]
mov rdx, qword [0x140047698]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4c00], r15
mov rcx, qword [rdi + 0x4c10]
test rcx, rcx
je 0x1400056ac
mov qword [rdi + 0x4c08], r15
mov rax, qword [0x1400476a8]
test rax, rax
je 0x140005699
dec dword [rax + 0xf4]
mov rdx, qword [0x140047698]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4c10], r15
mov rcx, qword [rdi + 0x4c20]
test rcx, rcx
je 0x1400056e4
mov qword [rdi + 0x4c18], r15
mov rax, qword [0x1400476a8]
test rax, rax
je 0x1400056d1
dec dword [rax + 0xf4]
mov rdx, qword [0x140047698]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4c20], r15
mov dword [rdi + 0x5a70], r15d
mov rcx, qword [rdi + 0x5a80]
test rcx, rcx
je 0x140005723
mov qword [rdi + 0x5a78], r15
mov rax, qword [0x1400476a8]
test rax, rax
je 0x140005710
dec dword [rax + 0xf4]
mov rdx, qword [0x140047698]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x5a80], r15
mov rcx, qword [rdi + 0x5bf0]
test rcx, rcx
je 0x14000575b
mov qword [rdi + 0x5be8], r15
mov rax, qword [0x1400476a8]
test rax, rax
je 0x140005748
dec dword [rax + 0xf4]
mov rdx, qword [0x140047698]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x5bf0], r15
mov rcx, qword [rdi + 0x5be0]
test rcx, rcx
je 0x140005793
mov qword [rdi + 0x5bd8], r15
mov rax, qword [0x1400476a8]
test rax, rax
je 0x140005780
dec dword [rax + 0xf4]
mov rdx, qword [0x140047698]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x5be0], r15
cmp qword [rdi + 0x5c60], 0
je 0x1400057c4
mov rbx, qword [rdi + 0x5c60]
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
cmp rbx, rax
je 0x1400057bd
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov qword [rdi + 0x5c60], r15
mov rcx, qword [rdi + 0x5c70]
test rcx, rcx
je 0x1400057fc
mov qword [rdi + 0x5c68], r15
mov rax, qword [0x1400476a8]
test rax, rax
je 0x1400057e9
dec dword [rax + 0xf4]
mov rdx, qword [0x140047698]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x5c70], r15
mov rcx, qword [rdi + 0x5ca8]
test rcx, rcx
je 0x140005834
mov qword [rdi + 0x5ca0], r15
mov rax, qword [0x1400476a8]
test rax, rax
je 0x140005821
dec dword [rax + 0xf4]
mov rdx, qword [0x140047698]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x5ca8], r15
mov rcx, qword [rdi + 0x5cb8]
test rcx, rcx
je 0x14000586c
mov qword [rdi + 0x5cb0], r15
mov rax, qword [0x1400476a8]
test rax, rax
je 0x140005859
dec dword [rax + 0xf4]
mov rdx, qword [0x140047698]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x5cb8], r15
mov dword [rdi + 0x5cc0], 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