Function at 0x140005800
Capabilities:
Write file on windows

Disassembly:
mov rax, rsp
push rbp
push rdi
push r12
push r14
push r15
mov rbp, rsp
sub rsp, 0x70
mov qword [rbp - 0x28], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov r14d, edx
mov rdi, rcx
cmp edx, 0xffffffff
jne 0x140005834
xor eax, eax
jmp 0x140005ac2
mov rax, qword [rcx + 0x40]
mov rcx, qword [rax]
test rcx, rcx
je 0x14000586f
mov rdx, qword [rdi + 0x58]
movsxd r8, dword [rdx]
lea rax, [rcx + r8]
cmp rcx, rax
jae 0x14000586f
lea eax, [r8 - 1]
mov dword [rdx], eax
mov rcx, qword [rdi + 0x40]
mov rdx, qword [rcx]
lea rax, [rdx + 1]
mov qword [rcx], rax
mov byte [rdx], r14b
mov eax, r14d
jmp 0x140005ac2
cmp qword [rdi + 0x90], 0
jne 0x140005882
or rax, 0xffffffffffffffff
jmp 0x140005ac2
mov r8, qword [rdi + 0x18]
lea rax, [rdi + 0x80]
cmp qword [r8], rax
jne 0x1400058ac
mov rdx, qword [rdi + 0x70]
mov rcx, qword [rdi + 0x68]
mov qword [r8], rcx
mov rax, qword [rdi + 0x38]
mov qword [rax], rcx
sub edx, ecx
mov rax, qword [rdi + 0x50]
mov dword [rax], edx
cmp qword [rdi + 0x78], 0
jne 0x1400058d2
movsx ecx, r14b
mov rdx, qword [rdi + 0x90]
call fcn.14019ae24
or rsi, 0xffffffffffffffff
cmp eax, esi
cmovne esi, r14d
jmp 0x140005ac0
mov byte [rbp - 0x30], r14b
mov edx, SafeArrayGetDim
mov qword [rbp - 8], rdx
mov byte [rbp - 0x20], 0
xor ecx, ecx
mov qword [rbp - 0x20], rcx
mov qword [rbp - 0x10], 8
lea rax, [rbp - 0x20]
cmp rdx, 0x10
cmovae rax, rcx
mov byte [rax + 8], cl
or rsi, 0xffffffffffffffff
xor r12d, r12d
mov r8, qword [rbp - 8]
mov r9, qword [rbp - 0x10]
nop
lea rax, [rbp - 0x20]
cmp r8, 0x10
cmovae rax, qword [rbp - 0x20]
lea rdx, [rbp - 0x20]
cmovae rdx, qword [rbp - 0x20]
mov rcx, qword [rdi + 0x78]
mov r10, qword [rcx]
add rax, r9
lea r8, [rbp + 0x40]
mov qword [rsp + 0x38], r8
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x28], rdx
lea rax, [rbp + 0x48]
mov qword [rsp + 0x20], rax
lea r9, [rbp - 0x2f]
lea r8, [rbp - 0x30]
lea rdx, [rdi + 0x84]
call qword [r10 + 0x38]
test eax, eax
js 0x140005aad
cmp eax, 1
jg 0x140005a91
lea rax, [rbp - 0x20]
mov r10, qword [rbp - 0x20]
mov r8, qword [rbp - 8]
cmp r8, 0x10
cmovae rax, r10
mov rbx, qword [rbp + 0x40]
sub rbx, rax
je 0x1400059ba
lea rcx, [rbp - 0x20]
cmp r8, 0x10
cmovae rcx, r10
mov r9, qword [rdi + 0x90]
mov r8, rbx
mov edx, 1
call fcn.14019b7d0
mov r8, qword [rbp - 8]
cmp rbx, rax
jne 0x140005ab1
mov byte [rdi + 0x81], 1
lea rax, [rbp - 0x30]
cmp qword [rbp + 0x48], rax
jne 0x140005a8c
mov r9, qword [rbp - 0x10]
test rbx, rbx
jne 0x140005910
cmp r9, 0x20
jae 0x140005ab1
mov rax, rsi
sub rax, r9
cmp rax, 8
jbe 0x140005a7f
lea rbx, [r9 + 8]
cmp rbx, 0xfffffffffffffffe
ja 0x140005a72
cmp r8, rbx
jae 0x140005a1e
mov r8, r9
mov rdx, rbx
lea rcx, [rbp - 0x20]
call fcn.14000b6e0
mov r8, qword [rbp - 8]
mov r9, qword [rbp - 0x10]
jmp 0x140005a3c
test rbx, rbx
jne 0x140005a45
mov qword [rbp - 0x10], r12
lea rax, [rbp - 0x20]
cmp r8, 0x10
cmovae rax, qword [rbp - 0x20]
mov byte [rax], r12b
jmp 0x140005907
test rbx, rbx
je 0x140005910
lea rax, [rbp - 0x20]
cmp r8, 0x10
cmovae rax, qword [rbp - 0x20]
xor ecx, ecx
mov qword [r9 + rax], rcx
mov qword [rbp - 0x10], rbx
lea rax, [rbp - 0x20]
cmp qword [rbp - 8], 0x10
cmovae rax, qword [rbp - 0x20]
mov byte [rbx + rax], cl
jmp 0x140005907
lea rcx, str.string_too_long
call fcn.1401bb8a0
int3
lea rcx, str.string_too_long
call fcn.1401bb8a0
int3
mov esi, r14d
jmp 0x140005ab1
cmp eax, 3
jne 0x140005aad
movsx ecx, byte [rbp - 0x30]
mov rdx, qword [rdi + 0x90]
call fcn.14019ae24
cmp eax, 0xffffffff
cmovne esi, r14d
mov r8, qword [rbp - 8]
cmp r8, 0x10
jb 0x140005ac0
mov rcx, qword [rbp - 0x20]
call fcn.140012b44
mov eax, esi
lea r11, [rsp + 0x70]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rbp
ret