Function at 0x140003f30
Capabilities:
Write file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x98
mov rdi, rcx
call fcn.14009d2b0
mov esi, dword [rax]
call fcn.14009d2b0
mov dword [rax], 0
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebp, eax
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [rdi + 0x78]
movabs r13, 0x7ffffffffffffff8
test al, 0x10
je 0x140004343
mov rax, qword [rdi + 0x48]
mov rbx, qword [rdi + 0x70]
cmp rbx, rax
jae 0x140003f91
mov qword [rdi + 0x70], rax
mov rbx, rax
mov r14, qword [rdi + 0x40]
sub rbx, r14
js 0x1400042ff
cmp rbx, r13
jae 0x140004312
cmp rbx, 0x16
ja 0x14000426b
lea rcx, [rsp + 0x48]
mov byte [rcx + 0x17], bl
lea r15, [rcx + rbx]
cmp rcx, r14
ja 0x140003fcb
cmp r15, r14
ja 0x140004330
test rbx, rbx
je 0x140003fdb
mov rdx, r14
mov r8, rbx
call fcn.1400d07c0
lea r14, [rdi + 0x10]
mov byte [r15], 0
movsx rbx, byte [rsp + 0x5f]
test rbx, rbx
jns 0x140003ff3
mov rbx, qword [rsp + 0x50]
mov dword [rsp + 0x60], ebp
jns 0x140004003
mov rcx, qword [rsp + 0x48]
call fcn.14009d26c
mov rax, qword [r14]
movsxd rax, dword [rax + 4]
mov r15, qword [r14 + rax + 0x30]
lea r12, [0x14014bb50]
cmp r15, r12
jne 0x14000431c
lea rax, [0x14014c850]
mov qword [rsp + 0x68], rax
mov rax, qword [0x14014c850]
cmp rax, 0xffffffffffffffff
jne 0x14000446e
movsxd rax, dword [0x14014c858]
lea rdx, [rax - 1]
mov rcx, qword [r15 + 0x10]
mov r8, qword [r15 + 0x18]
sub r8, rcx
sar r8, 3
cmp r8, rdx
jbe 0x1400042fa
mov rcx, qword [rcx + rax*8 - 8]
test rcx, rcx
je 0x1400042fa
mov rax, qword [rcx]
mov rax, qword [rax + 0x38]
mov dl, 0xa
call qword [0x14012fc00]
mov ebp, eax
cmp r15, r12
jne 0x140004393
mov rcx, r14
mov edx, ebp
call fcn.140004670
mov rcx, r14
call fcn.140004550
movabs rax, 0xaaaaaaaaaaaaaaaa
mov qword [rsp + 0x40], rax
movaps xmm0, xmmword [0x14011c0c0]
movaps xmmword [rsp + 0x30], xmm0
mov eax, dword [rdi + 0x78]
test al, 0x10
je 0x140004360
mov rax, qword [rdi + 0x48]
mov r14, qword [rdi + 0x70]
cmp r14, rax
jae 0x1400040d3
mov qword [rdi + 0x70], rax
mov r14, rax
mov r15, qword [rdi + 0x40]
sub r14, r15
js 0x1400042ff
cmp r14, r13
jae 0x140004326
cmp r14, 0x16
ja 0x14000422e
lea rcx, [rsp + 0x30]
mov byte [rcx + 0x17], r14b
lea r12, [rcx + r14]
cmp rcx, r15
ja 0x14000410e
cmp r12, r15
ja 0x140004330
test r14, r14
je 0x14000411e
mov rdx, r15
mov r8, r14
call fcn.1400d07c0
mov byte [r12], 0
mov r8, qword [rdi + 0x118]
lea r15, [rsp + 0x48]
mov qword [rsp + 0x20], r15
lea r12, [rsp + 0x68]
lea r14, [rsp + 0x30]
mov rcx, r12
mov rdx, r14
mov r9, 0xffffffffffffffff
call fcn.140091020
mov eax, dword [rdi + 0x128]
mov rcx, qword [rdi + 0x120]
mov dword [rsp + 0x64], eax
mov qword [rsp + 0x88], rcx
mov qword [rsp + 0x80], 0x56
mov al, byte [0x14014c8d6]
test al, al
jne 0x14000449b
cmp byte [rsp + 0x7f], 0
jns 0x140004194
mov rcx, qword [rsp + 0x68]
call fcn.14009d26c
mov eax, dword [rdi + 8]
cmp eax, 3
je 0x1400043bb
cmp eax, 2
jge 0x1400042ab
call fcn.1400d14d0
test al, al
je 0x1400041ec
lea r9, [rsp + 0x48]
mov dword [r9], 0xaaaaaaaa
movzx r8d, byte [rsp + 0x47]
test r8b, r8b
cmovs r8d, dword [rsp + 0x38]
cmovs r14, qword [rsp + 0x30]
mov rcx, qword [0x14014cac0]
mov qword [rsp + 0x20], 0
mov rdx, r14
call qword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [rdi + 8], 3
mov ebp, dword [rsp + 0x60]
je 0x14000437e
cmp byte [rsp + 0x47], 0
jns 0x14000420b
mov rcx, qword [rsp + 0x30]
call fcn.14009d26c
mov ecx, ebp
call qword [sym.imp.KERNEL32.dll_SetLastError]
call fcn.14009d2b0
mov dword [rax], esi
add rsp, 0x98
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
and r13, r14
add r13, 8
mov r12, r14
or r12, 7
cmp r12, 0x17
cmove r12, r13
inc r12
mov rcx, r12
call fcn.14009d274
mov rcx, rax
mov qword [rsp + 0x30], rax
bts r12, 0x3f
mov qword [rsp + 0x40], r12
mov qword [rsp + 0x38], r14
jmp 0x1400040fc
mov rax, rbx
and rax, r13
add rax, 8
mov r15, rbx
or r15, 7
cmp r15, 0x17
cmove r15, rax
inc r15
mov rcx, r15
call fcn.14009d274
mov rcx, rax
mov qword [rsp + 0x48], rax
bts r15, 0x3f
mov qword [rsp + 0x58], r15
mov qword [rsp + 0x50], rbx
jmp 0x140003fb9
movsx r15, byte [rsp + 0x47]
test r15, r15
cmovs r15, qword [rsp + 0x38]
mov r12, qword [rsp + 0x30]
cmovns r12, r14
test r15, r15
je 0x1400041a9
xor r13d, r13d
mov r8d, r15d
sub r8d, r13d
lea rdx, [r12 + r13]
mov ecx, 2
call fcn.14009d380
test eax, eax
js 0x1400041a9
mov eax, eax
add r13, rax
cmp r13, r15
jb 0x1400042cf
jmp 0x1400041a9
call fcn.1400d1300
lea rcx, [0x14011c264]
lea rdx, str....._third_partylibc_srcinclude_string_view:330:_assertion____end_____begin____0_failed:_std::string_view::string_view_iterator__sentinel__received_invalid_range_n
call fcn.1400d1300
lea rcx, [rsp + 0x48]
call fcn.1400d1300
lock inc dword [r15 + 8]
jmp 0x14000401f
lea rcx, [rsp + 0x30]
call fcn.1400d1300
lea rcx, [0x14011c264]
lea rdx, str....._third_partylibc_srcinclude__stringchar_traits.h:145:_assertion__std::__is_pointer_in_range___s1____s1____n____s2__failed:_char_traits::copy:_source_and_destination_ranges_overlap_n
call fcn.1400d1300
xor r14d, r14d
mov ebx, 0
test al, 8
je 0x140003fb1
mov r14, qword [rdi + 0x28]
mov rbx, qword [rdi + 0x38]
jmp 0x140003f95
xor r14d, r14d
mov r15d, 0
test al, 8
je 0x1400040f3
mov r15, qword [rdi + 0x28]
mov r14, qword [rdi + 0x38]
jmp 0x1400040d7
lea r8, [rsp + 0x30]
mov rcx, rdi
mov rdx, rbx
call fcn.1400ee930
jmp 0x1400041fa
mov eax, 0xffffffff
lock xadd dword [r15 + 8], eax
test eax, eax
jne 0x140004087
mov rax, qword [r15]
mov rax, qword [rax + 8]
mov rcx, r15
call qword [0x14012fc00]
jmp 0x140004087
mov eax, 3
cmp byte [0x14014caf4], 0
jne 0x1400041a0
mov byte [0x14014caf4], 1
mov eax, dword [0x14014cb00]
mov ecx, dword [0x140149990]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x140004505
mov rcx, rdi
mov rdx, r15
call fcn.1400ee860
movsx rax, byte [rsp + 0x5f]
test rax, rax
jns 0x140004419
mov rax, qword [rsp + 0x50]
mov r15, qword [rsp + 0x48]
mov qword [rsp + 0x68], r15
mov qword [rsp + 0x70], rax
test rax, rax
js 0x1400044df
sete al
test r15, r15
setne cl
or cl, al
je 0x1400044f2
mov rcx, qword [0x14014caf8]
lea rdx, [rsp + 0x68]
call fcn.140004790
cmp byte [rsp + 0x5f], 0
jns 0x14000445f
mov rcx, qword [rsp + 0x48]
call fcn.14009d26c
mov byte [0x14014caf4], 0
mov eax, dword [rdi + 8]
jmp 0x1400041a0
lea rax, [rsp + 0x68]
lea rcx, [rsp + 0x48]
mov qword [rcx], rax
lea rdx, [rsp + 0x30]
mov qword [rdx], rcx
lea rcx, [0x14014c850]
lea r8, [0x1400556a0]
call fcn.1400038c0
jmp 0x14000403c
movzx ecx, al
lea rax, [rsp + 0x88]
lea r9, [rsp + 0x48]
mov qword [r9], rax
lea rax, [rsp + 0x64]
mov qword [r9 + 8], rax
mov qword [r9 + 0x10], r12
lea rax, str.LogMessage
lea r8, [rsp + 0x90]
mov qword [r8], rax
lea rdx, [rsp + 0x80]
call fcn.1400eefa0
jmp 0x140004183
lea rcx, [0x14011c264]
lea rdx, str....._third_partylibc_srcinclude_string_view:318:_assertion___len___static_cast_size_type__numeric_limits_difference_type_::max____failed:_string_view::string_view__CharT___size_t_:_length_does_not_fit_in_difference_type_n
call fcn.1400d1300
lea rcx, [0x14011c264]
lea rdx, str....._third_partylibc_srcinclude_string_view:320:_assertion___len__0____s___nullptr_failed:_string_view::string_view__CharT___size_t_:_received_nullptr_n
call fcn.1400d1300
lea rcx, [0x14014cb00]
call fcn.14009d484
cmp dword [0x14014cb00], 0xffffffff
jne 0x1400043f9
lea rcx, str.LOG_FATAL
mov edx, 0x400
call fcn.140004660
mov qword [0x14014caf8], rax
lea rcx, [0x14014cb00]
call fcn.14009d418
jmp 0x1400043f9