Function at 0x140019a10
Capabilities:
Write file on windows

Disassembly:
push rbx
push r12
sub rsp, 0x38
mov rbx, qword [0x14007fbe0]
mov rax, qword [rbx + 0x38]
test rax, rax
je 0x140019a3b
cmp byte [rbx + 1], 0
je 0x140019a3b
mov byte [rax + 0x18], 0
mov rcx, qword [rbx + 0x38]
call fcn.14003f740
xor r12d, r12d
lea rcx, [rbx + 0x3ec0]
mov qword [rbx + 0x38], r12
call fcn.140011e10
cmp byte [rbx], r12b
je 0x14001a3ed
mov qword [rsp + 0x58], rbp
mov qword [rsp + 0x60], rsi
mov qword [rsp + 0x30], rdi
mov qword [rsp + 0x20], r15
cmp byte [rbx + 0x6188], r12b
je 0x140019ad3
mov rdi, qword [rbx + 0x20]
test rdi, rdi
je 0x140019ad3
mov rax, qword [0x14007fbe0]
lea rcx, [rsp + 0x50]
mov qword [rsp + 0x50], r12
mov dword [rax + 0x618c], r12d
call fcn.140031720
lea rdx, [0x140073af8]
mov rcx, rdi
mov rsi, rax
call fcn.140016300
mov rdi, rax
test rax, rax
je 0x140019ad3
mov r8, qword [rsp + 0x50]
lea edx, [r12 + 1]
mov r9, rax
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov rax, qword [0x14007fbe0]
mov rdi, qword [rax + 0x4c98]
movsxd rax, dword [rax + 0x4c90]
lea rsi, [rdi + rax*8]
cmp rdi, rsi
je 0x140019b02
mov rcx, qword [rdi]
call fcn.140033fc0
add rdi, 8
cmp rdi, rsi
jne 0x140019af1
mov ebp, r12d
mov qword [rsp + 0x28], r14
cmp dword [rbx + 0x6148], r12d
jle 0x140019bbe
mov r14, r12
nop word [rax + rax]
mov rax, qword [rbx + 0x6150]
mov rsi, qword [r14 + rax + 8]
test rsi, rsi
je 0x140019bac
mov rcx, rsi
call fcn.140035c90
mov rdi, qword [0x14007fbe0]
test rdi, rdi
je 0x140019ba3
movsx rdx, word [rdi + 0x6328]
lea rcx, [rdi + 0x632c]
mov r8d, dword [rdi + 0x40a8]
lea rcx, [rcx + rdx*8]
cmp dword [rcx], r8d
je 0x140019b99
lea ecx, [rdx + 1]
mov eax, 0x2aaaaaab
imul ecx
mov eax, edx
shr eax, 0x1f
add edx, eax
lea eax, [rdx + rdx*2]
add eax, eax
sub ecx, eax
mov word [rdi + 0x6328], cx
movsx rax, cx
lea rcx, [rdi + 0x632c]
lea rcx, [rcx + rax*8]
mov dword [rcx], r8d
mov dword [rcx + 4], r12d
inc word [rcx + 6]
inc dword [rdi + 0x6324]
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
inc ebp
add r14, 0x10
cmp ebp, dword [rbx + 0x6148]
jl 0x140019b20
mov rdi, qword [rbx + 0x61d8]
movsxd rsi, dword [rbx + 0x61d0]
shl rsi, 5
add rsi, rdi
cmp rdi, rsi
je 0x140019bf0
cmp dword [rdi + 4], 6
jne 0x140019be7
mov rdx, rdi
mov rcx, rbx
call qword [rdi + 0x10]
add rdi, 0x20
cmp rdi, rsi
jne 0x140019bd8
mov ebp, r12d
cmp dword [rbx + 0x40f0], r12d
jle 0x140019cad
mov r14, r12
nop dword [rax]
nop word [rax + rax]
mov rax, qword [rbx + 0x40f8]
mov rsi, qword [r14 + rax]
test rsi, rsi
je 0x140019c9b
mov rcx, rsi
call fcn.14001aab0
mov rdi, qword [0x14007fbe0]
test rdi, rdi
je 0x140019c92
movsx rdx, word [rdi + 0x6328]
lea rcx, [rdi + 0x632c]
mov r8d, dword [rdi + 0x40a8]
lea rcx, [rcx + rdx*8]
cmp dword [rcx], r8d
je 0x140019c88
lea ecx, [rdx + 1]
mov eax, 0x2aaaaaab
imul ecx
mov eax, edx
shr eax, 0x1f
add edx, eax
lea eax, [rdx + rdx*2]
add eax, eax
sub ecx, eax
mov word [rdi + 0x6328], cx
movsx rax, cx
lea rcx, [rdi + 0x632c]
lea rcx, [rcx + rax*8]
mov dword [rcx], r8d
mov dword [rcx + 4], r12d
inc word [rcx + 6]
inc dword [rdi + 0x6324]
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
inc ebp
add r14, 8
cmp ebp, dword [rbx + 0x40f0]
jl 0x140019c10
lea rcx, [rbx + 0x40f0]
call fcn.140011e10
lea rcx, [rbx + 0x4100]
call fcn.140011e10
lea rcx, [rbx + 0x4110]
call fcn.140011e10
mov r15, qword [rsp + 0x20]
mov r14, qword [rsp + 0x28]
mov rbp, qword [rsp + 0x58]
mov qword [rbx + 0x4150], r12
mov r8, qword [rbx + 0x4128]
test r8, r8
je 0x140019d78
mov rdi, qword [0x14007fbe0]
mov qword [rbx + 0x4120], r12
test rdi, rdi
je 0x140019d68
movsx rdx, word [rdi + 0x6328]
lea rcx, [rdi + 0x632c]
mov r9d, dword [rdi + 0x40a8]
lea rcx, [rcx + rdx*8]
cmp dword [rcx], r9d
je 0x140019d5e
lea ecx, [rdx + 1]
mov eax, 0x2aaaaaab
imul ecx
mov eax, edx
shr eax, 0x1f
add edx, eax
lea eax, [rdx + rdx*2]
add eax, eax
sub ecx, eax
mov word [rdi + 0x6328], cx
movsx rax, cx
lea rcx, [rdi + 0x632c]
lea rcx, [rcx + rax*8]
mov dword [rcx], r9d
mov dword [rcx + 4], r12d
inc word [rcx + 6]
inc dword [rdi + 0x6324]
mov rcx, r8
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rbx + 0x4128], r12
lea rcx, [rbx + 0x4130]
call fcn.140011e10
mov qword [rbx + 0x4d10], r12
lea rdi, [rbx + 0x4968]
mov qword [rbx + 0x4160], r12
mov eax, 0xffffffff
movsx rax, ax
mov ecx, 0x9a
mov qword [rbx + 0x4158], r12
mov qword [rbx + 0x41f0], r12
mov qword [rbx + 0x41d8], r12
mov qword [rbx + 0x4168], r12
rep stosw word [rdi], ax
lea rcx, [rbx + 0x4aa0]
call fcn.140011e10
lea rcx, [rbx + 0x4ab0]
call fcn.140011e10
mov r8, qword [rbx + 0x4c08]
test r8, r8
je 0x140019e6f
mov rdi, qword [0x14007fbe0]
mov qword [rbx + 0x4c00], r12
test rdi, rdi
je 0x140019e5f
movsx rdx, word [rdi + 0x6328]
lea rcx, [rdi + 0x632c]
mov r9d, dword [rdi + 0x40a8]
lea rcx, [rcx + rdx*8]
cmp dword [rcx], r9d
je 0x140019e55
lea ecx, [rdx + 1]
mov eax, 0x2aaaaaab
imul ecx
mov eax, edx
shr eax, 0x1f
add edx, eax
lea eax, [rdx + rdx*2]
add eax, eax
sub ecx, eax
mov word [rdi + 0x6328], cx
movsx rax, cx
lea rcx, [rdi + 0x632c]
lea rcx, [rcx + rax*8]
mov dword [rcx], r9d
mov dword [rcx + 4], r12d
inc word [rcx + 6]
inc dword [rdi + 0x6324]
mov rcx, r8
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rbx + 0x4c08], r12
mov r8, qword [rbx + 0x4c18]
test r8, r8
je 0x140019f00
mov rdi, qword [0x14007fbe0]
mov qword [rbx + 0x4c10], r12
test rdi, rdi
je 0x140019ef0
movsx rdx, word [rdi + 0x6328]
lea rcx, [rdi + 0x632c]
mov r9d, dword [rdi + 0x40a8]
lea rcx, [rcx + rdx*8]
cmp dword [rcx], r9d
je 0x140019ee6
lea ecx, [rdx + 1]
mov eax, 0x2aaaaaab
imul ecx
mov eax, edx
shr eax, 0x1f
add edx, eax
lea eax, [rdx + rdx*2]
add eax, eax
sub ecx, eax
mov word [rdi + 0x6328], cx
movsx rax, cx
lea rcx, [rdi + 0x632c]
lea rcx, [rcx + rax*8]
mov dword [rcx], r9d
mov dword [rcx + 4], r12d
inc word [rcx + 6]
inc dword [rdi + 0x6324]
mov rcx, r8
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rbx + 0x4c18], r12
lea rcx, [rbx + 0x4c20]
call fcn.140011e10
lea rcx, [rbx + 0x4c60]
call fcn.140011e10
lea rcx, [rbx + 0x4c70]
call fcn.140011e10
mov r8, qword [rbx + 0x4c88]
test r8, r8
je 0x140019fb5
mov rdi, qword [0x14007fbe0]
mov qword [rbx + 0x4c80], r12
test rdi, rdi
je 0x140019fa5
movsx rdx, word [rdi + 0x6328]
lea rcx, [rdi + 0x632c]
mov r9d, dword [rdi + 0x40a8]
lea rcx, [rcx + rdx*8]
cmp dword [rcx], r9d
je 0x140019f9b
lea ecx, [rdx + 1]
mov eax, 0x2aaaaaab
imul ecx
mov eax, edx
shr eax, 0x1f
add edx, eax
lea eax, [rdx + rdx*2]
add eax, eax
sub ecx, eax
mov word [rdi + 0x6328], cx
movsx rax, cx
lea rcx, [rdi + 0x632c]
lea rcx, [rcx + rax*8]
mov dword [rcx], r9d
mov dword [rcx + 4], r12d
inc word [rcx + 6]
inc dword [rdi + 0x6324]
mov rcx, r8
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rbx + 0x4c88], r12
lea rcx, [rbx + 0x4c90]
mov qword [rbx + 0x4cb0], r12
mov qword [rbx + 0x4ca8], r12
mov qword [rbx + 0x4ca0], r12
call fcn.14003e670
lea rcx, [rbx + 0x5058]
call fcn.14003e310
mov r8, qword [rbx + 0x5088]
test r8, r8
je 0x14001a073
mov rdi, qword [0x14007fbe0]
mov qword [rbx + 0x5080], r12
test rdi, rdi
je 0x14001a063
movsx rdx, word [rdi + 0x6328]
lea rcx, [rdi + 0x632c]
mov r9d, dword [rdi + 0x40a8]
lea rcx, [rcx + rdx*8]
cmp dword [rcx], r9d
je 0x14001a059
lea ecx, [rdx + 1]
mov eax, 0x2aaaaaab
imul ecx
mov eax, edx
shr eax, 0x1f
add edx, eax
lea eax, [rdx + rdx*2]
add eax, eax
sub ecx, eax
mov word [rdi + 0x6328], cx
movsx rax, cx
lea rcx, [rdi + 0x632c]
lea rcx, [rcx + rax*8]
mov dword [rcx], r9d
mov dword [rcx + 4], r12d
inc word [rcx + 6]
inc dword [rdi + 0x6324]
mov rcx, r8
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rbx + 0x5088], r12
mov r8, qword [rbx + 0x5098]
test r8, r8
je 0x14001a104
mov rdi, qword [0x14007fbe0]
mov qword [rbx + 0x5090], r12
test rdi, rdi
je 0x14001a0f4
movsx rdx, word [rdi + 0x6328]
lea rcx, [rdi + 0x632c]
mov r9d, dword [rdi + 0x40a8]
lea rcx, [rcx + rdx*8]
cmp dword [rcx], r9d
je 0x14001a0ea
lea ecx, [rdx + 1]
mov eax, 0x2aaaaaab
imul ecx
mov eax, edx
shr eax, 0x1f
add edx, eax
lea eax, [rdx + rdx*2]
add eax, eax
sub ecx, eax
mov word [rdi + 0x6328], cx
movsx rax, cx
lea rcx, [rdi + 0x632c]
lea rcx, [rcx + rax*8]
mov dword [rcx], r9d
mov dword [rcx + 4], r12d
inc word [rcx + 6]
inc dword [rdi + 0x6324]
mov rcx, r8
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rbx + 0x5098], r12
mov edi, r12d
cmp dword [rbx + 0x4fd8], r12d
jle 0x14001a131
movsxd rax, edi
lea rcx, [rax + rax*4]
mov rax, qword [rbx + 0x4fe0]
lea rcx, [rax + rcx*8]
call fcn.140016fa0
inc edi
cmp edi, dword [rbx + 0x4fd8]
jl 0x14001a110
mov r8, qword [rbx + 0x4fe0]
test r8, r8
je 0x14001a1c2
mov rdi, qword [0x14007fbe0]
mov qword [rbx + 0x4fd8], r12
test rdi, rdi
je 0x14001a1b2
movsx rdx, word [rdi + 0x6328]
lea rcx, [rdi + 0x632c]
mov r9d, dword [rdi + 0x40a8]
lea rcx, [rcx + rdx*8]
cmp dword [rcx], r9d
je 0x14001a1a8
lea ecx, [rdx + 1]
mov eax, 0x2aaaaaab
imul ecx
mov eax, edx
shr eax, 0x1f
add edx, eax
lea eax, [rdx + rdx*2]
add eax, eax
sub ecx, eax
mov word [rdi + 0x6328], cx
movsx rax, cx
lea rcx, [rdi + 0x632c]
lea rcx, [rcx + rax*8]
mov dword [rcx], r9d
mov dword [rcx + 4], r12d
inc word [rcx + 6]
inc dword [rdi + 0x6324]
mov rcx, r8
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rbx + 0x4fe0], r12
lea rcx, [rbx + 0x5008]
call fcn.14003e430
mov edi, r12d
mov rsi, qword [rsp + 0x60]
cmp dword [rbx + 0x4ff8], r12d
jle 0x14001a200
nop
movsxd rax, edi
imul rcx, rax, 0x88
add rcx, qword [rbx + 0x5000]
call fcn.14003f060
inc edi
cmp edi, dword [rbx + 0x4ff8]
jl 0x14001a1e0
mov r8, qword [rbx + 0x5000]
test r8, r8
je 0x14001a291
mov rdi, qword [0x14007fbe0]
mov qword [rbx + 0x4ff8], r12
test rdi, rdi
je 0x14001a281
movsx rdx, word [rdi + 0x6328]
lea rcx, [rdi + 0x632c]
mov r9d, dword [rdi + 0x40a8]
lea rcx, [rcx + rdx*8]
cmp dword [rcx], r9d
je 0x14001a277
lea ecx, [rdx + 1]
mov eax, 0x2aaaaaab
imul ecx
mov eax, edx
shr eax, 0x1f
add edx, eax
lea eax, [rdx + rdx*2]
add eax, eax
sub ecx, eax
mov word [rdi + 0x6328], cx
movsx rax, cx
lea rcx, [rdi + 0x632c]
lea rcx, [rcx + rax*8]
mov dword [rcx], r9d
mov dword [rcx + 4], r12d
inc word [rcx + 6]
inc dword [rdi + 0x6324]
mov rcx, r8
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rbx + 0x5000], r12
lea rcx, [rbx + 0x5040]
call fcn.140011e10
lea rcx, [rbx + 0x6098]
call fcn.140011e10
lea rcx, [rbx + 0x60a8]
call fcn.140011e10
lea rcx, [rbx + 0x50e0]
call fcn.140011e10
lea rcx, [rbx + 0x50f0]
call fcn.140011e10
lea rcx, [rbx + 0x5100]
call fcn.140011e10
lea rcx, [rbx + 0x5f68]
mov dword [rbx + 0x5f60], r12d
call fcn.140011e10
lea rcx, [rbx + 0x61b0]
call fcn.140011e10
mov r8, qword [rbx + 0x61a8]
test r8, r8
je 0x14001a38a
mov rdi, qword [0x14007fbe0]
mov qword [rbx + 0x61a0], r12
test rdi, rdi
je 0x14001a37a
movsx r10, word [rdi + 0x6328]
lea rdx, [rdi + 0x632c]
mov r9d, dword [rdi + 0x40a8]
lea rdx, [rdx + r10*8]
cmp dword [rdx], r9d
je 0x14001a370
lea ecx, [r10 + 1]
mov eax, 0x2aaaaaab
imul ecx
mov eax, edx
shr eax, 0x1f
add edx, eax
lea eax, [rdx + rdx*2]
add eax, eax
lea rdx, [rdi + 0x632c]
sub ecx, eax
mov word [rdi + 0x6328], cx
movsx rax, cx
lea rdx, [rdx + rax*8]
mov dword [rdx], r9d
mov dword [rdx + 4], r12d
inc word [rdx + 6]
inc dword [rdi + 0x6324]
mov rcx, r8
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rbx + 0x61a8], r12
cmp qword [rbx + 0x6248], r12
je 0x14001a3ba
mov rdi, qword [rbx + 0x6248]
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
cmp rdi, rax
je 0x14001a3b3
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov qword [rbx + 0x6248], r12
lea rcx, [rbx + 0x6250]
call fcn.140011e10
lea rcx, [rbx + 0x6288]
call fcn.140011e10
lea rcx, [rbx + 0x6298]
call fcn.140011e10
mov rdi, qword [rsp + 0x30]
mov dword [rbx + 0x62a8], r12d
mov byte [rbx], r12b
add rsp, 0x38
pop r12
pop rbx
ret