Function at 0x140004c40
Capabilities:
Write file on windows

Disassembly:
push r15
push r14
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0xa0
mov rsi, rcx
mov eax, dword [rcx + 0x78]
movabs r12, 0x7ffffffffffffff8
test al, 0x10
je 0x140005019
mov rax, qword [rsi + 0x48]
mov rdi, qword [rsi + 0x70]
cmp rdi, rax
jae 0x140004c7d
mov qword [rsi + 0x70], rax
mov rdi, rax
mov rbx, qword [rsi + 0x40]
sub rdi, rbx
js 0x140004fd5
cmp rdi, r12
jae 0x140004fe8
cmp rdi, 0x16
ja 0x140004f41
lea rcx, [rsp + 0x50]
mov byte [rcx + 0x17], dil
lea r14, [rcx + rdi]
cmp rcx, rbx
ja 0x140004cb8
cmp r14, rbx
ja 0x140005006
test rdi, rdi
je 0x140004cc8
mov rdx, rbx
mov r8, rdi
call fcn.1400d60b0
lea rbx, [rsi + 0x10]
mov byte [r14], 0
movsx rdi, byte [rsp + 0x67]
test rdi, rdi
jns 0x140004ce0
mov rdi, qword [rsp + 0x58]
jns 0x140004cec
mov rcx, qword [rsp + 0x50]
call fcn.1400a2cfc
mov rax, qword [rbx]
movsxd rax, dword [rax + 4]
mov r14, qword [rbx + rax + 0x30]
lea r15, [0x140150b30]
cmp r14, r15
jne 0x140004ff2
lea rax, [0x140151830]
mov qword [rsp + 0x70], rax
mov rax, qword [0x140151830]
cmp rax, 0xffffffffffffffff
jne 0x14000513c
movsxd rax, dword [0x140151838]
lea rdx, [rax - 1]
mov rcx, qword [r14 + 0x10]
mov r8, qword [r14 + 0x18]
sub r8, rcx
sar r8, 3
cmp r8, rdx
jbe 0x140004fd0
mov rcx, qword [rcx + rax*8 - 8]
test rcx, rcx
je 0x140004fd0
mov rax, qword [rcx]
mov rax, qword [rax + 0x38]
mov dl, 0xa
call qword [0x140134870]
mov ebp, eax
cmp r14, r15
jne 0x140005067
mov rcx, rbx
mov edx, ebp
call fcn.140005340
mov rcx, rbx
call fcn.140005220
movabs rax, 0xaaaaaaaaaaaaaaaa
mov qword [rsp + 0x40], rax
movaps xmm0, xmmword [0x14011ea30]
movaps xmmword [rsp + 0x30], xmm0
mov eax, dword [rsi + 0x78]
test al, 0x10
je 0x140005035
mov rax, qword [rsi + 0x48]
mov rbx, qword [rsi + 0x70]
cmp rbx, rax
jae 0x140004dbc
mov qword [rsi + 0x70], rax
mov rbx, rax
mov r14, qword [rsi + 0x40]
sub rbx, r14
js 0x140004fd5
cmp rbx, r12
jae 0x140004ffc
cmp rbx, 0x16
ja 0x140004f04
lea rcx, [rsp + 0x30]
mov byte [rcx + 0x17], bl
lea r15, [rcx + rbx]
cmp rcx, r14
ja 0x140004df6
cmp r15, r14
ja 0x140005006
test rbx, rbx
je 0x140004e06
mov rdx, r14
mov r8, rbx
call fcn.1400d60b0
mov byte [r15], 0
mov r8, qword [rsi + 0x118]
lea r14, [rsp + 0x50]
mov qword [rsp + 0x20], r14
lea r15, [rsp + 0x70]
lea rbx, [rsp + 0x30]
mov rcx, r15
mov rdx, rbx
mov r9, 0xffffffffffffffff
call fcn.1400933f0
mov eax, dword [rsi + 0x128]
mov rcx, qword [rsi + 0x120]
mov dword [rsp + 0x6c], eax
mov qword [rsp + 0x90], rcx
mov qword [rsp + 0x88], 0x56
mov al, byte [0x1401518b6]
test al, al
jne 0x140005169
cmp byte [rsp + 0x87], 0
jns 0x140004e7e
mov rcx, qword [rsp + 0x70]
call fcn.1400a2cfc
mov eax, dword [rsi + 8]
cmp eax, 3
je 0x14000508f
cmp eax, 2
jge 0x140004f81
call fcn.1400d6c60
test al, al
je 0x140004ed6
lea r9, [rsp + 0x50]
mov dword [r9], 0xaaaaaaaa
movzx r8d, byte [rsp + 0x47]
test r8b, r8b
cmovs r8d, dword [rsp + 0x38]
cmovs rbx, qword [rsp + 0x30]
mov rcx, qword [0x140151aa0]
mov qword [rsp + 0x20], 0
mov rdx, rbx
call qword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [rsi + 8], 3
je 0x140005052
cmp byte [rsp + 0x47], 0
jns 0x140004ef1
mov rcx, qword [rsp + 0x30]
call fcn.1400a2cfc
nop
add rsp, 0xa0
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r14
pop r15
ret
and r12, rbx
add r12, 8
mov r15, rbx
or r15, 7
cmp r15, 0x17
cmove r15, r12
inc r15
mov rcx, r15
call fcn.1400a2d04
mov rcx, rax
mov qword [rsp + 0x30], rax
bts r15, 0x3f
mov qword [rsp + 0x40], r15
mov qword [rsp + 0x38], rbx
jmp 0x140004de4
mov rax, rdi
and rax, r12
add rax, 8
mov r14, rdi
or r14, 7
cmp r14, 0x17
cmove r14, rax
inc r14
mov rcx, r14
call fcn.1400a2d04
mov rcx, rax
mov qword [rsp + 0x50], rax
bts r14, 0x3f
mov qword [rsp + 0x60], r14
mov qword [rsp + 0x58], rdi
jmp 0x140004ca6
movsx r14, byte [rsp + 0x47]
test r14, r14
cmovs r14, qword [rsp + 0x38]
mov r15, qword [rsp + 0x30]
cmovns r15, rbx
test r14, r14
je 0x140004e93
xor r12d, r12d
mov r8d, r14d
sub r8d, r12d
lea rdx, [r15 + r12]
mov ecx, 2
call fcn.1400a2e08
test eax, eax
js 0x140004e93
mov eax, eax
add r12, rax
cmp r12, r14
jb 0x140004fa5
jmp 0x140004e93
call fcn.1400d6ae0
lea rcx, [0x140121d8c]
lea rdx, str....._third_partylibc_srcinclude_string_view:326:_assertion____end_____begin____0_failed:_std::string_view::string_view_iterator__sentinel__received_invalid_range_n
call fcn.1400d6ae0
lea rcx, [rsp + 0x50]
call fcn.1400d6ae0
lock inc dword [r14 + 8]
jmp 0x140004d08
lea rcx, [rsp + 0x30]
call fcn.1400d6ae0
lea rcx, [0x140121d8c]
lea rdx, str....._third_partylibc_srcinclude__stringchar_traits.h:146:_assertion__std::__is_pointer_in_range___s1____s1____n____s2__failed:_char_traits::copy:_source_and_destination_ranges_overlap_n
call fcn.1400d6ae0
xor ebx, ebx
mov edi, 0
test al, 8
je 0x140004c9d
mov rbx, qword [rsi + 0x28]
mov rdi, qword [rsi + 0x38]
jmp 0x140004c81
xor ebx, ebx
mov r14d, 0
test al, 8
je 0x140004ddc
mov r14, qword [rsi + 0x28]
mov rbx, qword [rsi + 0x38]
jmp 0x140004dc0
lea r8, [rsp + 0x30]
mov rcx, rsi
mov rdx, rdi
call fcn.1400f3b90
jmp 0x140004ee0
mov eax, 0xffffffff
lock xadd dword [r14 + 8], eax
test eax, eax
jne 0x140004d70
mov rax, qword [r14]
mov rax, qword [rax + 8]
mov rcx, r14
call qword [0x140134870]
jmp 0x140004d70
mov eax, 3
cmp byte [0x140151ad4], 0
jne 0x140004e8a
mov byte [0x140151ad4], 1
mov eax, dword [0x140151ae0]
mov ecx, dword [0x14014e950]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x1400051d3
mov rcx, rsi
mov rdx, r14
call fcn.1400f3ac0
movsx rax, byte [rsp + 0x67]
test rax, rax
jns 0x1400050ed
mov rax, qword [rsp + 0x58]
mov r14, qword [rsp + 0x50]
mov qword [rsp + 0x70], r14
mov qword [rsp + 0x78], rax
test rax, rax
js 0x1400051ad
je 0x14000510b
test r14, r14
je 0x1400051c0
mov rcx, qword [0x140151ad8]
lea rdx, [rsp + 0x70]
call fcn.140005460
cmp byte [rsp + 0x67], 0
jns 0x14000512d
mov rcx, qword [rsp + 0x50]
call fcn.1400a2cfc
mov byte [0x140151ad4], 0
mov eax, dword [rsi + 8]
jmp 0x140004e8a
lea rax, [rsp + 0x70]
lea rcx, [rsp + 0x50]
mov qword [rcx], rax
lea rdx, [rsp + 0x30]
mov qword [rdx], rcx
lea rcx, [0x140151830]
lea r8, [0x140056f40]
call fcn.1400045b0
jmp 0x140004d25
movzx ecx, al
lea rax, [rsp + 0x90]
lea r9, [rsp + 0x50]
mov qword [r9], rax
lea rax, [rsp + 0x6c]
mov qword [r9 + 8], rax
mov qword [r9 + 0x10], r15
lea rax, str.LogMessage
lea r8, [rsp + 0x98]
mov qword [r8], rax
lea rdx, [rsp + 0x88]
call fcn.1400f41d0
jmp 0x140004e6a
lea rcx, [0x140121d8c]
lea rdx, str....._third_partylibc_srcinclude_string_view:314:_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.1400d6ae0
lea rcx, [0x140121d8c]
lea rdx, str....._third_partylibc_srcinclude_string_view:316:_assertion___len__0____s___nullptr_failed:_string_view::string_view__CharT___size_t_:_received_nullptr_n
call fcn.1400d6ae0
lea rcx, [0x140151ae0]
call fcn.1400a35c4
cmp dword [0x140151ae0], 0xffffffff
jne 0x1400050cd
lea rcx, str.LOG_FATAL
mov edx, 0x400
call fcn.140005330
mov qword [0x140151ad8], rax
lea rcx, [0x140151ae0]
call fcn.1400a3558
jmp 0x1400050cd