Function at 0x140004870
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 [0x14003e6a8]
mov rax, qword [rdi + 0x38]
test rax, rax
je 0x14000495c
cmp byte [rdi + 1], 0
je 0x14000495c
mov byte [rax + 0x18], 0
mov rbx, qword [rdi + 0x38]
test rbx, rbx
je 0x14000495c
mov rcx, rbx
call fcn.140024880
nop
mov rcx, qword [rbx + 0x80]
test rcx, rcx
je 0x1400048eb
mov rax, qword [0x14003e6a8]
test rax, rax
je 0x1400048de
dec dword [rax + 0xec]
mov rdx, qword [0x14003e698]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
nop
mov rcx, qword [rbx + 0x70]
test rcx, rcx
je 0x140004913
mov rax, qword [0x14003e6a8]
test rax, rax
je 0x140004906
dec dword [rax + 0xec]
mov rdx, qword [0x14003e698]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
nop
mov rcx, qword [rbx + 0x60]
test rcx, rcx
je 0x14000493b
mov rax, qword [0x14003e6a8]
test rax, rax
je 0x14000492e
dec dword [rax + 0xec]
mov rdx, qword [0x14003e698]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
nop
mov rax, qword [0x14003e6a8]
test rax, rax
je 0x14000494d
dec dword [rax + 0xec]
mov rdx, qword [0x14003e698]
mov rcx, rbx
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
xor r15d, r15d
mov qword [rdi + 0x38], r15
mov rcx, qword [rdi + 0x3c50]
test rcx, rcx
je 0x14000499b
mov qword [rdi + 0x3c48], r15
mov rax, qword [0x14003e6a8]
test rax, rax
je 0x140004988
dec dword [rax + 0xec]
mov rdx, qword [0x14003e698]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x3c50], r15
cmp byte [rdi], r15b
je 0x1400052f6
cmp byte [rdi + 0x5bf9], r15b
je 0x140004a0c
mov rbx, qword [rdi + 0x20]
test rbx, rbx
je 0x140004a0c
mov rax, qword [0x14003e6a8]
mov dword [rax + 0x5bfc], r15d
mov qword [rsp + 0x40], r15
lea rcx, [rsp + 0x40]
call fcn.140017290
mov rsi, rax
lea rdx, [0x140033374]
mov rcx, rbx
call fcn.140002ff0
mov rbx, rax
test rax, rax
je 0x140004a0c
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 + 0x5c40], r15d
jle 0x140004a50
mov rsi, r15
nop dword [rax + rax]
mov rcx, qword [rdi + 0x5c48]
cmp dword [rsi + rcx + 4], 6
jne 0x140004a42
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 + 0x5c40]
jl 0x140004a20
mov esi, r15d
cmp dword [rdi + 0x3e78], r15d
jle 0x140004aa7
mov r14, r15
nop
mov rax, qword [rdi + 0x3e80]
mov rbx, qword [r14 + rax]
test rbx, rbx
je 0x140004a99
mov rcx, rbx
call fcn.140005840
mov rax, qword [0x14003e6a8]
test rax, rax
je 0x140004a8a
dec dword [rax + 0xec]
mov rdx, qword [0x14003e698]
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 0x140004a60
mov rcx, qword [rdi + 0x3e80]
test rcx, rcx
je 0x140004adf
mov qword [rdi + 0x3e78], r15
mov rax, qword [0x14003e6a8]
test rax, rax
je 0x140004acc
dec dword [rax + 0xec]
mov rdx, qword [0x14003e698]
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 0x140004b17
mov qword [rdi + 0x3e88], r15
mov rax, qword [0x14003e6a8]
test rax, rax
je 0x140004b04
dec dword [rax + 0xec]
mov rdx, qword [0x14003e698]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x3e90], r15
mov rcx, qword [rdi + 0x3ea0]
test rcx, rcx
je 0x140004b4f
mov qword [rdi + 0x3e98], r15
mov rax, qword [0x14003e6a8]
test rax, rax
je 0x140004b3c
dec dword [rax + 0xec]
mov rdx, qword [0x14003e698]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x3ea0], r15
mov qword [rdi + 0x3ed8], r15
mov rcx, qword [rdi + 0x3eb0]
test rcx, rcx
je 0x140004b8e
mov qword [rdi + 0x3ea8], r15
mov rax, qword [0x14003e6a8]
test rax, rax
je 0x140004b7b
dec dword [rax + 0xec]
mov rdx, qword [0x14003e698]
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 0x140004bc6
mov qword [rdi + 0x3eb8], r15
mov rax, qword [0x14003e6a8]
test rax, rax
je 0x140004bb3
dec dword [rax + 0xec]
mov rdx, qword [0x14003e698]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x3ec0], r15
mov qword [rdi + 0x48c0], r15
mov qword [rdi + 0x3ee8], r15
mov qword [rdi + 0x3ee0], r15
mov qword [rdi + 0x3f70], r15
mov qword [rdi + 0x3f58], r15
mov qword [rdi + 0x3ef0], r15
lea rcx, [rdi + 0x4610]
call fcn.140001260
mov rcx, qword [rdi + 0x4830]
test rcx, rcx
je 0x140004c34
mov qword [rdi + 0x4828], r15
mov rax, qword [0x14003e6a8]
test rax, rax
je 0x140004c21
dec dword [rax + 0xec]
mov rdx, qword [0x14003e698]
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 0x140004c6c
mov qword [rdi + 0x4838], r15
mov rax, qword [0x14003e6a8]
test rax, rax
je 0x140004c59
dec dword [rax + 0xec]
mov rdx, qword [0x14003e698]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4840], r15
mov rcx, qword [rdi + 0x4850]
test rcx, rcx
je 0x140004ca4
mov qword [rdi + 0x4848], r15
mov rax, qword [0x14003e6a8]
test rax, rax
je 0x140004c91
dec dword [rax + 0xec]
mov rdx, qword [0x14003e698]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4850], r15
mov rcx, qword [rdi + 0x4890]
test rcx, rcx
je 0x140004cdc
mov qword [rdi + 0x4888], r15
mov rax, qword [0x14003e6a8]
test rax, rax
je 0x140004cc9
dec dword [rax + 0xec]
mov rdx, qword [0x14003e698]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4890], r15
mov rcx, qword [rdi + 0x48a0]
test rcx, rcx
je 0x140004d14
mov qword [rdi + 0x4898], r15
mov rax, qword [0x14003e6a8]
test rax, rax
je 0x140004d01
dec dword [rax + 0xec]
mov rdx, qword [0x14003e698]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x48a0], r15
mov ebp, r15d
cmp dword [rdi + 0x48b0], r15d
jle 0x140004e2f
mov r14, r15
nop word [rax + rax]
mov rax, qword [rdi + 0x48b8]
mov rbx, qword [r14 + rax]
test rbx, rbx
je 0x140004e1d
mov rsi, qword [rbx + 0x38]
test rsi, rsi
je 0x140004d76
mov rcx, rsi
call fcn.140001030
mov rax, qword [0x14003e6a8]
test rax, rax
je 0x140004d67
dec dword [rax + 0xec]
mov rdx, qword [0x14003e698]
mov rcx, rsi
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov rsi, qword [rbx + 0x40]
test rsi, rsi
je 0x140004da9
mov rcx, rsi
call fcn.140001030
mov rax, qword [0x14003e6a8]
test rax, rax
je 0x140004d99
dec dword [rax + 0xec]
mov rdx, qword [0x14003e698]
mov rcx, rsi
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
nop
mov rcx, qword [rbx + 0xa0]
test rcx, rcx
je 0x140004dd4
mov rax, qword [0x14003e6a8]
test rax, rax
je 0x140004dc7
dec dword [rax + 0xec]
mov rdx, qword [0x14003e698]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
nop
mov rcx, qword [rbx + 0x60]
test rcx, rcx
je 0x140004dfc
mov rax, qword [0x14003e6a8]
test rax, rax
je 0x140004def
dec dword [rax + 0xec]
mov rdx, qword [0x14003e698]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
nop
mov rax, qword [0x14003e6a8]
test rax, rax
je 0x140004e0e
dec dword [rax + 0xec]
mov rdx, qword [0x14003e698]
mov rcx, rbx
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
inc ebp
add r14, 8
cmp ebp, dword [rdi + 0x48b0]
jl 0x140004d30
mov rcx, qword [rdi + 0x48b8]
test rcx, rcx
je 0x140004e67
mov qword [rdi + 0x48b0], r15
mov rax, qword [0x14003e6a8]
test rax, rax
je 0x140004e54
dec dword [rax + 0xec]
mov rdx, qword [0x14003e698]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x48b8], r15
lea rcx, [rdi + 0x4ba8]
call fcn.1400183a0
mov rcx, qword [rdi + 0x4bd8]
test rcx, rcx
je 0x140004eab
mov qword [rdi + 0x4bd0], r15
mov rax, qword [0x14003e6a8]
test rax, rax
je 0x140004e98
dec dword [rax + 0xec]
mov rdx, qword [0x14003e698]
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 0x140004ee3
mov qword [rdi + 0x4be0], r15
mov rax, qword [0x14003e6a8]
test rax, rax
je 0x140004ed0
dec dword [rax + 0xec]
mov rdx, qword [0x14003e698]
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 0x140004f3e
mov rsi, r15
nop dword [rax]
nop word [rax + rax]
mov rax, qword [rdi + 0x4b30]
mov rcx, qword [rsi + rax + 0x20]
test rcx, rcx
je 0x140004f30
mov rax, qword [0x14003e6a8]
test rax, rax
je 0x140004f23
dec dword [rax + 0xec]
mov rdx, qword [0x14003e698]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
nop
inc ebx
add rsi, 0x28
cmp ebx, dword [rdi + 0x4b28]
jl 0x140004f00
mov rcx, qword [rdi + 0x4b30]
test rcx, rcx
je 0x140004f76
mov qword [rdi + 0x4b28], r15
mov rax, qword [0x14003e6a8]
test rax, rax
je 0x140004f63
dec dword [rax + 0xec]
mov rdx, qword [0x14003e698]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4b30], r15
lea rcx, [rdi + 0x4b58]
call fcn.140018540
mov esi, r15d
cmp dword [rdi + 0x4b48], r15d
jle 0x140004fdc
mov rbp, r15
mov rbx, qword [rdi + 0x4b50]
lea rcx, [rbx + 0x10]
add rcx, rbp
call fcn.140024190
nop
mov rcx, qword [rbx + rbp + 0x20]
test rcx, rcx
je 0x140004fce
mov rax, qword [0x14003e6a8]
test rax, rax
je 0x140004fc1
dec dword [rax + 0xec]
mov rdx, qword [0x14003e698]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
nop
inc esi
add rbp, 0x70
cmp esi, dword [rdi + 0x4b48]
jl 0x140004f91
mov rcx, qword [rdi + 0x4b50]
test rcx, rcx
je 0x140005014
mov qword [rdi + 0x4b48], r15
mov rax, qword [0x14003e6a8]
test rax, rax
je 0x140005001
dec dword [rax + 0xec]
mov rdx, qword [0x14003e698]
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 0x14000504c
mov qword [rdi + 0x4b90], r15
mov rax, qword [0x14003e6a8]
test rax, rax
je 0x140005039
dec dword [rax + 0xec]
mov rdx, qword [0x14003e698]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4b98], r15
mov rcx, qword [rdi + 0x5bc0]
test rcx, rcx
je 0x140005084
mov qword [rdi + 0x5bb8], r15
mov rax, qword [0x14003e6a8]
test rax, rax
je 0x140005071
dec dword [rax + 0xec]
mov rdx, qword [0x14003e698]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x5bc0], r15
mov rcx, qword [rdi + 0x5bd0]
test rcx, rcx
je 0x1400050bc
mov qword [rdi + 0x5bc8], r15
mov rax, qword [0x14003e6a8]
test rax, rax
je 0x1400050a9
dec dword [rax + 0xec]
mov rdx, qword [0x14003e698]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x5bd0], r15
mov rcx, qword [rdi + 0x4c38]
test rcx, rcx
je 0x1400050f4
mov qword [rdi + 0x4c30], r15
mov rax, qword [0x14003e6a8]
test rax, rax
je 0x1400050e1
dec dword [rax + 0xec]
mov rdx, qword [0x14003e698]
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 0x14000512c
mov qword [rdi + 0x4c40], r15
mov rax, qword [0x14003e6a8]
test rax, rax
je 0x140005119
dec dword [rax + 0xec]
mov rdx, qword [0x14003e698]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4c48], r15
mov rcx, qword [rdi + 0x4c58]
test rcx, rcx
je 0x140005164
mov qword [rdi + 0x4c50], r15
mov rax, qword [0x14003e6a8]
test rax, rax
je 0x140005151
dec dword [rax + 0xec]
mov rdx, qword [0x14003e698]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4c58], r15
mov dword [rdi + 0x5aa8], r15d
mov rcx, qword [rdi + 0x5ab8]
test rcx, rcx
je 0x1400051a3
mov qword [rdi + 0x5ab0], r15
mov rax, qword [0x14003e6a8]
test rax, rax
je 0x140005190
dec dword [rax + 0xec]
mov rdx, qword [0x14003e698]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x5ab8], r15
mov rcx, qword [rdi + 0x5c28]
test rcx, rcx
je 0x1400051db
mov qword [rdi + 0x5c20], r15
mov rax, qword [0x14003e6a8]
test rax, rax
je 0x1400051c8
dec dword [rax + 0xec]
mov rdx, qword [0x14003e698]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x5c28], r15
mov rcx, qword [rdi + 0x5c18]
test rcx, rcx
je 0x140005213
mov qword [rdi + 0x5c10], r15
mov rax, qword [0x14003e6a8]
test rax, rax
je 0x140005200
dec dword [rax + 0xec]
mov rdx, qword [0x14003e698]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x5c18], r15
cmp qword [rdi + 0x5ca0], 0
je 0x140005244
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 0x14000523d
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov qword [rdi + 0x5ca0], r15
mov rcx, qword [rdi + 0x5cb0]
test rcx, rcx
je 0x14000527c
mov qword [rdi + 0x5ca8], r15
mov rax, qword [0x14003e6a8]
test rax, rax
je 0x140005269
dec dword [rax + 0xec]
mov rdx, qword [0x14003e698]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x5cb0], r15
mov rcx, qword [rdi + 0x5ce8]
test rcx, rcx
je 0x1400052b4
mov qword [rdi + 0x5ce0], r15
mov rax, qword [0x14003e6a8]
test rax, rax
je 0x1400052a1
dec dword [rax + 0xec]
mov rdx, qword [0x14003e698]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x5ce8], r15
mov rcx, qword [rdi + 0x5cf8]
test rcx, rcx
je 0x1400052ec
mov qword [rdi + 0x5cf0], r15
mov rax, qword [0x14003e6a8]
test rax, rax
je 0x1400052d9
dec dword [rax + 0xec]
mov rdx, qword [0x14003e698]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x5cf8], r15
mov dword [rdi + 0x5d00], 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