Function at 0x140020af0
Capabilities:
Check if file exists
Get file size

Disassembly:
mov byte [rsp + 0x18], r8b
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rsi
push rdi
sub rsp, 0x1e8
mov dword [rsp + 0x40], 0
movzx eax, byte [rsp + 0x210]
test eax, eax
jne 0x140020ea3
mov eax, 0x10
mov eax, eax
mov ecx, dword [0x1402ca580]
mov rdx, qword gs:[0x58]
add rax, qword [rdx + rcx*8]
mov rdx, rax
lea rcx, [rsp + 0xa0]
call fcn.14021bc90
nop
mov qword [rsp + 0xb8], 0
lea rcx, [rsp + 0x178]
call fcn.1400174d0
lea rcx, [rsp + 0xf8]
mov rdi, rcx
mov rsi, rax
mov ecx, 0x10
rep movsb byte [rdi], byte [rsi]
lea rax, [rsp + 0x110]
lea rcx, [rsp + 0xf8]
mov rdi, rax
mov rsi, rcx
mov ecx, 0x10
rep movsb byte [rdi], byte [rsi]
lea r8, [rsp + 0xb8]
mov rdx, qword [rsp + 0x200]
lea rcx, [rsp + 0x110]
call fcn.140011b90
mov qword [rsp + 0x90], rax
cmp qword [rsp + 0x90], 0
jne 0x140020be4
mov dword [rsp + 0x60], 3
lea rcx, [rsp + 0xa0]
call fcn.14021bdc0
mov eax, dword [rsp + 0x60]
jmp 0x140021064
mov qword [rsp + 0x58], 0
lea rax, [rsp + 0x80]
mov rdi, rax
xor eax, eax
mov ecx, 8
rep stosb byte [rdi], al
mov qword [rsp + 0x48], 0
mov qword [rsp + 0x88], 0
mov qword [rsp + 0x98], 0
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x8000000
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov r8d, 1
mov edx, 0x80000000
mov rcx, qword [rsp + 0x90]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [rsp + 0x48], rax
cmp qword [rsp + 0x48], 0xffffffffffffffff
jne 0x140020c72
mov qword [rsp + 0x48], 0
jmp 0x140020e1b
lea rax, [rsp + 0xc0]
mov rdi, rax
xor eax, eax
mov ecx, 8
rep stosb byte [rdi], al
mov rax, qword [rsp + 0xc0]
mov qword [rsp + 0x80], rax
lea rdx, [rsp + 0x80]
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x140020cb2
jmp 0x140020e1b
mov rax, qword [rsp + 0x80]
mov qword [rsp + 0x58], rax
cmp qword [rsp + 0x58], 0x7fffffff
jle 0x140020cf3
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [rsp + 0x64], 2
lea rcx, [rsp + 0xa0]
call fcn.14021bdc0
mov eax, dword [rsp + 0x64]
jmp 0x140021064
cmp qword [rsp + 0x58], 0
jne 0x140020d5a
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [rsp + 0x40], 1
mov rax, qword [rsp + 0x208]
mov qword [rax], 0
mov rax, qword [rsp + 0x208]
mov qword [rax + 8], 0
mov rax, qword [rsp + 0x208]
mov dword [rax + 0x10], 0
mov eax, dword [rsp + 0x40]
mov dword [rsp + 0x68], eax
lea rcx, [rsp + 0xa0]
call fcn.14021bdc0
mov eax, dword [rsp + 0x68]
jmp 0x140021064
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
xor r9d, r9d
mov r8d, 2
xor edx, edx
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov qword [rsp + 0x88], rax
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
xor r9d, r9d
xor r8d, r8d
mov edx, 4
mov rcx, qword [rsp + 0x88]
call qword [sym.imp.KERNEL32.dll_MapViewOfFileEx]
mov qword [rsp + 0x98], rax
mov rax, qword [rsp + 0x208]
mov rcx, qword [rsp + 0x88]
mov qword [rax], rcx
mov rax, qword [rsp + 0x208]
mov rcx, qword [rsp + 0x98]
mov qword [rax + 8], rcx
mov rax, qword [rsp + 0x208]
mov ecx, dword [rsp + 0x58]
mov dword [rax + 0x10], ecx
mov eax, dword [rsp + 0x40]
mov dword [rsp + 0x6c], eax
lea rcx, [rsp + 0xa0]
call fcn.14021bdc0
mov eax, dword [rsp + 0x6c]
jmp 0x140021064
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x70], eax
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [rsp + 0x40], 3
mov eax, dword [rsp + 0x70]
mov dword [rsp + 0x44], eax
cmp dword [rsp + 0x44], 2
je 0x140020e65
cmp dword [rsp + 0x44], 3
je 0x140020e65
cmp dword [rsp + 0x44], 5
je 0x140020e6f
cmp dword [rsp + 0x44], 0xc
je 0x140020e6f
cmp dword [rsp + 0x44], 0xf
je 0x140020e65
jmp 0x140020e77
mov dword [rsp + 0x40], 4
jmp 0x140020e77
mov dword [rsp + 0x40], 5
mov eax, dword [rsp + 0x40]
mov dword [rsp + 0x74], eax
lea rcx, [rsp + 0xa0]
call fcn.14021bdc0
mov eax, dword [rsp + 0x74]
jmp 0x140021064
lea rcx, [rsp + 0x188]
call fcn.140017460
lea rcx, [rsp + 0x120]
mov rdi, rcx
mov rsi, rax
mov ecx, 0x10
rep movsb byte [rdi], byte [rsi]
lea rax, [rsp + 0x130]
lea rcx, [rsp + 0x120]
mov rdi, rax
mov rsi, rcx
mov ecx, 0x10
rep movsb byte [rdi], byte [rsi]
mov r9, qword [rsp + 0x200]
mov r8d, 1
lea rdx, [rsp + 0x130]
lea rcx, [rsp + 0x1b8]
call fcn.14000f810
lea rcx, [rsp + 0x198]
mov rdi, rcx
mov rsi, rax
mov ecx, 0x20
rep movsb byte [rdi], byte [rsi]
lea rax, [rsp + 0xd0]
lea rcx, [rsp + 0x198]
mov rdi, rax
mov rsi, rcx
mov ecx, 0x20
rep movsb byte [rdi], byte [rsi]
cmp qword [rsp + 0xe8], 0x7fffffff
jle 0x140020f5f
mov dword [rsp + 0x40], 2
lea rcx, [rsp + 0xd0]
call fcn.14000f9a0
jmp 0x140021060
cmp qword [rsp + 0xe0], 0
je 0x140020fa4
mov rax, qword [rsp + 0x208]
mov qword [rax], 0
mov rax, qword [rsp + 0x208]
mov rcx, qword [rsp + 0xe0]
mov qword [rax + 8], rcx
mov rax, qword [rsp + 0x208]
mov ecx, dword [rsp + 0xe8]
mov dword [rax + 0x10], ecx
jmp 0x140021060
lea rax, [rsp + 0x140]
mov rdi, rax
xor eax, eax
mov ecx, 0x38
rep stosb byte [rdi], al
mov rdx, qword [rsp + 0x200]
lea rcx, [rsp + 0x140]
call fcn.14000f4c0
mov dword [rsp + 0x78], eax
lea rdx, [rsp + 0x140]
lea rcx, [rsp + 0xf0]
call fcn.1400210b0
mov rdx, rax
lea rcx, [rsp + 0xc8]
call fcn.1402165d0
nop
mov eax, dword [rsp + 0x78]
mov dword [rsp + 0x50], eax
cmp dword [rsp + 0x50], 1
je 0x140021016
cmp dword [rsp + 0x50], 4
je 0x140021020
cmp dword [rsp + 0x50], 5
je 0x14002102a
jmp 0x140021032
mov dword [rsp + 0x40], 3
jmp 0x140021032
mov dword [rsp + 0x40], 4
jmp 0x140021032
mov dword [rsp + 0x40], 5
cmp dword [rsp + 0x40], 0
jne 0x140021053
lea rcx, [rsp + 0x140]
call fcn.14021ea10
test rax, rax
jne 0x140021053
mov dword [rsp + 0x40], 1
lea rcx, [rsp + 0xc8]
call fcn.140021120
mov eax, dword [rsp + 0x40]
add rsp, 0x1e8
pop rdi
pop rsi
ret