Function at 0x180018f38
Capabilities:
Get file size
Query environment variable

Disassembly:
mov r11, rsp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x520
mov rax, qword [0x1800a98a0]
xor rax, rsp
mov qword [rsp + 0x510], rax
mov dword [rsp + 0x4c], r9d
mov dword [rsp + 0x48], r8d
mov qword [rsp + 0x58], rdx
mov rdi, rcx
mov qword [r11 - 0x4b0], rdx
mov r13d, dword [rsp + 0x580]
mov dword [rsp + 0x60], r13d
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x70], xmm0
xor eax, eax
mov qword [r11 - 0x4d8], rax
mov qword [r11 - 0x4d0], rax
xor ebx, ebx
mov r12d, ebx
mov esi, 0x208
mov r8d, esi
xor edx, edx
lea rcx, [r11 - 0x258]
call sub.ntdll.dll_memset
mov r8d, esi
xor edx, edx
lea rcx, [rsp + 0xf0]
call sub.ntdll.dll_memset
bt r13d, 9
jb 0x18003fc8c
mov r9d, 0x103
mov r8, rdi
lea edx, [r9 + 1]
lea rcx, [rsp + 0xf0]
call qword [sym.imp.ntdll.dll_wcsncpy_s]
lea rax, [rsp + 0xc0]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x300]
mov qword [rsp + 0x20], rax
mov r9d, 0x104
xor r8d, r8d
lea rdx, [rsp + 0xf0]
xor ecx, ecx
call qword [sym.imp.api_ms_win_core_processenvironment_l1_1_0.dll_SearchPathW]
test eax, eax
je 0x18001944d
mov qword [rsp + 0x30], rbx
mov dword [rsp + 0x28], ebx
mov dword [rsp + 0x20], 3
xor r9d, r9d
lea esi, [r9 + 1]
mov r8d, esi
mov edx, 0x80000000
lea rcx, [rsp + 0x300]
call qword [sym.imp.api_ms_win_core_file_l1_1_0.dll_CreateFileW]
mov r15, rax
mov qword [rsp + 0xb8], rax
cmp rax, 0xffffffffffffffff
je 0x180019427
mov qword [rsp + 0x28], rbx
mov dword [rsp + 0x20], ebx
xor r9d, r9d
lea r14d, [rsi + 1]
mov r8d, r14d
xor edx, edx
mov rcx, rax
call qword [sym.imp.api_ms_win_core_memory_l1_1_0.dll_CreateFileMappingW]
mov qword [rsp + 0xb0], rax
test rax, rax
je 0x18003fca9
mov qword [rsp + 0x20], rbx
xor r9d, r9d
xor r8d, r8d
lea edx, [rsi + 3]
mov rcx, rax
call qword [sym.imp.api_ms_win_core_memory_l1_1_0.dll_MapViewOfFile]
mov rdi, rax
mov qword [rsp + 0x70], rax
test rax, rax
je 0x1800193f3
xor edx, edx
mov rcx, r15
call qword [sym.imp.api_ms_win_core_file_l1_1_0.dll_GetFileSize]
mov dword [rsp + 0x40], eax
mov edx, eax
add rdx, rdi
mov qword [rsp + 0x50], rdx
mov qword [rsp + 0x80], rdx
cmp rdx, rdi
jb 0x1800193f3
mov ecx, edx
sub ecx, edi
cmp ecx, 0x1a
jb 0x1800193f3
mov qword [rsp + 0x78], rdi
lea rax, [rsp + 0x300]
mov qword [rsp + 0x88], rax
mov r9, qword [rsp + 0x58]
movzx ecx, r9w
sub ecx, esi
jne 0x18001921e
cmp dword [rdi], 0x46464952
je 0x1800191e7
cmp word [rdi], bx
jne 0x1800193e4
movzx eax, word [rdi + 2]
sub ax, si
cmp ax, si
ja 0x1800193e4
movzx ecx, word [rdi + 4]
cmp cx, si
jb 0x1800193e4
mov edx, ebx
mov r11d, 0x100
mov eax, dword [rsp + 0x48]
cmp eax, r11d
cmovne edx, eax
mov r8d, ebx
mov r10d, dword [rsp + 0x4c]
cmp r10d, r11d
cmovne r8d, r10d
bt r13d, 0x10
jb 0x1800193c1
cmp r9, 3
je 0x18001918b
movzx esi, r14w
mov word [rsp + 0x42], si
mov word [rsp + 0x44], cx
mov word [rsp + 0x40], bx
movdqu xmm0, xmmword [rsp + 0x70]
movaps xmmword [rsp + 0xd0], xmm0
movups xmm1, xmmword [rsp + 0x80]
movaps xmmword [rsp + 0xe0], xmm1
mov dword [rsp + 0x28], r13d
mov dword [rsp + 0x20], r10d
mov r9d, eax
lea r8, [rsp + 0x40]
mov rdx, rdi
lea rcx, [rsp + 0xd0]
call fcn.1800180f8
mov qword [rsp + 0x68], rax
mov r12, rax
jmp 0x1800193e4
lea rax, [rsp + 0x40]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], r13d
mov r9d, dword [rsp + 0x4c]
mov r8d, dword [rsp + 0x48]
lea rdx, [rsp + 0xa8]
lea rcx, [rsp + 0x70]
call fcn.18002b6d8
mov qword [rsp + 0x68], rax
mov rdi, qword [rsp + 0x70]
jmp 0x1800191df
sub ecx, 1
jne 0x1800192e7
mov rsi, rbx
mov qword [rsp + 0x90], rbx
mov r15, rbx
mov qword [rsp + 0x98], rbx
mov r14, rbx
mov qword [rsp + 0xa0], rbx
mov dword [rsp + 0x58], ebx
mov r13d, ebx
mov dword [rsp + 0x64], ebx
test dword [rsp + 0x60], 0x20000
jne 0x1800192f5
test rsi, rsi
jne 0x18001927d
mov rsi, rdi
mov qword [rsp + 0x90], rdi
lea r15, [rdi + 0xe]
mov qword [rsp + 0x98], r15
mov eax, 0x4d42
cmp word [rsi], ax
jne 0x1800193e4
test r13d, r13d
jne 0x180019296
sub edx, edi
mov dword [rsp + 0x58], edx
mov eax, dword [r15 + 0x14]
cmp eax, 0x28
cmovb eax, ebx
mov dword [rsp + 0x40], eax
mov edx, dword [rsp + 0x58]
mov rcx, r15
call fcn.1800160d4
test eax, eax
je 0x1800193a8
cmp dword [rsi + 0xa], 0x1a
jb 0x180019376
mov eax, dword [rsp + 0x58]
sub eax, dword [rsp + 0x40]
cmp dword [rsi + 0xa], eax
ja 0x180019376
mov eax, dword [rsi + 0xa]
lea rcx, [r15 - 0xe]
add rcx, rax
mov qword [rsp + 0x50], rcx
jmp 0x18001937b
sub ecx, 1
je 0x180019123
jmp 0x1800193e4
call fcn.1800022e8
test eax, eax
je 0x18001936c
mov r9d, 2
lea r8, [rsp + 0x58]
mov edx, dword [rsp + 0x40]
mov rcx, rdi
mov rax, qword [0x1800aa178]
mov r10, qword [case.0x18001f7d3.0]
call r10
mov r14, rax
mov qword [rsp + 0xa0], rax
test rax, rax
je 0x18001936c
mov rcx, rax
call qword [sym.imp.api_ms_win_core_heap_obsolete_l1_1_0.dll_GlobalLock]
mov rsi, rax
mov qword [rsp + 0x90], rax
test rax, rax
je 0x180019363
lea r15, [rax + 0xe]
mov qword [rsp + 0x98], r15
mov r13d, 1
mov dword [rsp + 0x64], r13d
jmp 0x18001936c
mov rcx, r14
call qword [sym.imp.api_ms_win_core_heap_l2_1_0.dll_GlobalFree]
mov rdx, qword [rsp + 0x50]
jmp 0x180019261
mov qword [rsp + 0x50], rbx
lea rax, [rsp + 0x50]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rbx
mov r9d, dword [rsp + 0x60]
mov r8d, dword [rsp + 0x4c]
mov edx, dword [rsp + 0x48]
mov rcx, r15
call fcn.1800164d8
mov r12, rax
mov qword [rsp + 0x68], rax
test r13d, r13d
je 0x1800193e4
mov rcx, r14
call qword [sym.imp.api_ms_win_core_heap_obsolete_l1_1_0.dll_GlobalUnlock]
mov rcx, r14
call qword [sym.imp.api_ms_win_core_heap_l2_1_0.dll_GlobalFree]
jmp 0x1800193e4
cmp cx, si
jne 0x180019181
movzx eax, byte [rdi + 6]
cmp eax, edx
jne 0x1800193e4
movzx eax, byte [rdi + 7]
cmp eax, r8d
jne 0x1800193e4
mov eax, dword [rsp + 0x48]
jmp 0x180019181
jmp 0x1800193f3
test rdi, rdi
je 0x180019401
mov rcx, rdi
call qword [sym.imp.api_ms_win_core_memory_l1_1_0.dll_UnmapViewOfFile]
mov rcx, qword [rsp + 0xb0]
test rcx, rcx
je 0x180019414
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
mov rcx, qword [rsp + 0xb8]
test rcx, rcx
je 0x180019427
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
mov rax, r12
mov rcx, qword [rsp + 0x510]
xor rcx, rsp
call fcn.180033470
add rsp, 0x520
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret
mov ecx, 2
call qword [sym.imp.ntdll.dll_RtlSetLastWin32Error]
xor eax, eax
jmp 0x18001942a
mov r8d, 0x104
lea rdx, [rsp + 0xf0]
mov rcx, rdi
call qword [sym.imp.api_ms_win_core_processenvironment_l1_1_0.dll_ExpandEnvironmentStringsW]
nop
jmp 0x180018ff1
mov rdi, qword [rsp + 0x70]
jmp 0x1800193f3