Function at 0x100019d30
Capabilities:
Clear file content

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rdi
push r12
push r14
push r15
sub rsp, 0x40
mov r14d, 1
mov rdi, rcx
mov ebp, r14d
call fcn.100019360
xor r12d, r12d
mov rbx, rax
test rcx, rcx
jne 0x100019d6d
lea ecx, [rdi + 6]
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x10001a048
cmp qword [rdi + 0x40], r12
je 0x100019d7b
mov eax, r14d
jmp 0x10001a048
test rax, rax
je 0x100019d73
test byte [rdi + 0x2c], r14b
je 0x100019fa2
mov eax, dword [rax + 0x1a8]
test al, 0x11
jne 0x100019fa2
test al, 2
jne 0x100019da4
test al, 4
je 0x100019fa2
and qword [rsp + 0x78], r12
and dword [rsp + 0x70], r12d
lea r8, [rsp + 0x70]
lea rdx, [rsp + 0x78]
call fcn.10001f668
test eax, eax
je 0x100019de6
cmp qword [rsp + 0x78], r12
je 0x100019df8
mov r8d, dword [rsp + 0x70]
cmp r8d, 2
jb 0x100019de6
mov rdx, qword [rsp + 0x78]
mov rcx, rdi
call fcn.10001f8bc
neg eax
sbb edx, edx
and ebp, edx
cmp qword [rsp + 0x78], r12
je 0x100019df8
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, rbx
call fcn.100019950
test eax, eax
jne 0x100019e1d
and dword [rbx + 0x120], r12d
lea rcx, [rbx + 0xe0]
lea r8d, [rax + 0x40]
xor edx, edx
call fcn.100039740
mov rcx, qword [rbx + 0x10]
test rcx, rcx
je 0x100019e3e
cmp qword [rbx + 0x1e0], r12
jne 0x100019e3e
mov eax, dword [rbx + 0x40]
test al, 8
jne 0x100019e3e
or eax, 0x10
mov dword [rbx + 0x40], eax
jmp 0x100019e42
and dword [rbx + 0x40], 0xffffffef
test rcx, rcx
je 0x100019e74
cmp qword [rbx + 0x1e0], r12
je 0x100019e74
xor eax, eax
test eax, eax
jne 0x100019e70
test byte [rcx + 0xf], 2
mov rcx, qword [rcx]
cmove eax, r14d
test rcx, rcx
jne 0x100019e52
test eax, eax
jne 0x100019e70
or dword [rbx + 0x40], 0x20
jmp 0x100019e74
and dword [rbx + 0x40], 0xffffffdf
test ebp, ebp
je 0x100019f94
mov rcx, rdi
call fcn.100020e8c
lea r15, [0x10000e8c8]
test eax, eax
je 0x100019ebc
mov rcx, rdi
call fcn.1000211fc
test eax, eax
je 0x100019ebc
mov rcx, rbx
call fcn.100021748
test eax, eax
je 0x100019ebc
mov rcx, rbx
call fcn.100021628
test eax, eax
je 0x100019ebc
and dword [rbx + 0x1a8], 0xffffffe9
jmp 0x100019f00
xor ebp, ebp
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8, qword [rbx + 0x200]
mov r12d, eax
movzx eax, ax
mov dword [rsp + 0x30], 0xf4c
or eax, 0x80070000
test r12d, r12d
lea r9, [0x10000e8f8]
cmovle eax, r12d
mov rdx, rdi
mov ecx, r14d
mov qword [rsp + 0x28], r15
mov dword [rsp + 0x20], eax
call fcn.100018010
test ebp, ebp
je 0x100019f94
xor edx, edx
mov rcx, rbx
call fcn.100020a20
test eax, eax
je 0x100019f31
mov rax, qword [rbx + 0x210]
and dword [rbx + 0x1a8], 0xfffffff7
mov qword [rbx + 0x218], rax
and dword [rdi + 0x2c], 0xfffffffe
jmp 0x100019f75
xor ebp, ebp
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8, qword [rbx + 0x200]
mov r12d, eax
movzx eax, ax
mov dword [rsp + 0x30], 0xf68
or eax, 0x80070000
test r12d, r12d
lea r9, [0x10000e920]
cmovle eax, r12d
mov rdx, rdi
mov ecx, r14d
mov qword [rsp + 0x28], r15
mov dword [rsp + 0x20], eax
call fcn.100018010
test ebp, ebp
je 0x100019f94
mov rcx, rbx
call fcn.1000197d0
bt eax, 8
jae 0x100019f9b
mov rax, qword [rbx + 0x70]
mov qword [rbx + 0x210], rax
jmp 0x100019f9b
or dword [rbx + 0x1a8], 0x10
and dword [rbx + 0x1a8], 0xfffffff1
test byte [rbx + 0x1a8], r14b
jne 0x10001a038
mov rcx, rbx
call fcn.1000197d0
test al, 0x10
je 0x10001a038
mov rcx, qword [rbx + 8]
mov rax, qword [0x10005c4b0]
mov rdx, qword [rbx + 0x218]
mov qword [rbx + 0x210], rdx
cmp rcx, rax
jne 0x100019ffa
cmp dword [0x10005d5f4], 0
je 0x100019ff7
mov rcx, qword [0x10005c4b8]
xor r9d, r9d
xor r8d, r8d
call qword [0x10005d638]
jmp 0x10001a00e
cmp rcx, rax
cmove rcx, qword [0x10005c4b8]
xor r9d, r9d
xor r8d, r8d
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
mov rcx, qword [rbx + 8]
mov rdx, qword [0x10005c4b0]
cmp rcx, rdx
jne 0x10001a02a
cmp dword [0x10005d5f4], 0
jne 0x10001a038
cmp rcx, rdx
cmove rcx, qword [0x10005c4b8]
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
test r12d, r12d
je 0x10001a046
mov ecx, r12d
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, ebp
mov rbx, qword [rsp + 0x80]
add rsp, 0x40
pop r15
pop r14
pop r12
pop rdi
pop rbp
ret