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

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rax - 0xbd8]
sub rsp, 0xcb0
mov rax, qword [0x140009010]
xor rax, rsp
mov qword [rbp + 0xba0], rax
movsxd r12, ecx
mov esi, 1
mov ecx, esi
mov qword [rsp + 0x58], rdx
call qword [sym.imp.KERNEL32.dll_SetErrorMode]
lea ebx, [rsi + 1]
mov ecx, ebx
lea rdx, str..ACP
call qword [sym.imp.api_ms_win_crt_locale_l1_1_0.dll_setlocale]
mov ecx, ebx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
call fcn.140002850
movzx ecx, byte [0x140009796]
test al, al
cmovne ecx, esi
mov byte [0x140009796], cl
mov ecx, esi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
call fcn.140002850
movzx ecx, byte [0x140009793]
test al, al
cmovne ecx, esi
mov byte [0x140009793], cl
cmp r12d, esi
je 0x140002378
xor r13b, r13b
mov byte [rsp + 0x50], sil
xor r8d, r8d
mov byte [0x140009790], r13b
xor edx, edx
lea rcx, str.PRINT_HRESULT_ON_FAIL
xor r14b, r14b
xor r15d, r15d
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
movzx ecx, byte [0x140009790]
mov rbx, r12
test eax, eax
mov qword [rsp + 0x60], rbx
mov edi, esi
mov edx, 0xfffd
cmovne ecx, esi
mov byte [0x140009790], cl
cmp r12, rsi
jle 0x14000200c
mov rax, qword [rsp + 0x58]
mov rbx, qword [rax + rsi*8]
mov ecx, 7
movzx eax, word [rbx]
sub ax, 0x2d
test dx, ax
jne 0x140001fec
mov r8d, ecx
lea rdx, str.define:
add rbx, 2
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsnicmp]
test eax, eax
jne 0x140001c29
lea rax, [rbx + 0xe]
mov qword [0x1400097a8], rax
jmp 0x140001fcb
lea rdx, str.folddups
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
test eax, eax
jne 0x140001c4d
mov eax, 1
mov byte [0x140009792], al
jmp 0x140001fcb
mov r8d, 8
lea rdx, str.machine:
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsnicmp]
test eax, eax
jne 0x140001e4e
add rbx, 0x10
lea rdx, str.AMD64
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
test eax, eax
je 0x140001e2c
lea rdx, [0x1400066d0]
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
test eax, eax
jne 0x140001cc4
mov eax, 0x1c4
mov word [0x140009798], ax
mov eax, 2
mov word [0x140009794], ax
mov eax, 0xf4
mov word [0x140009040], ax
jmp 0x140001fcb
lea rdx, str.ARM64
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
test eax, eax
jne 0x140001cf7
mov eax, 0xaa64
mov word [0x140009798], ax
mov eax, 2
mov word [0x140009794], ax
mov eax, 0xf6
jmp 0x140001cb8
lea rdx, str.ARM64EC
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
test eax, eax
jne 0x140001d2a
mov eax, 0xa641
mov word [0x140009798], ax
mov eax, 2
mov word [0x140009794], ax
mov eax, 0xf8
jmp 0x140001cb8
lea rdx, str.ARM64X
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
test eax, eax
jne 0x140001d60
mov eax, 0xa64e
mov word [0x140009798], ax
mov eax, 2
mov word [0x140009794], ax
mov eax, 0xf9
jmp 0x140001cb8
lea rdx, [0x140006708]
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
test eax, eax
jne 0x140001d96
mov eax, 0xebc
mov word [0x140009798], ax
mov eax, 1
mov word [0x140009794], ax
mov eax, 0xe0
jmp 0x140001cb8
lea rdx, str.IA64
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
test eax, eax
jne 0x140001dcc
mov eax, 0x200
mov word [0x140009798], ax
mov eax, 0x10
mov word [0x140009794], ax
mov eax, 0x80
jmp 0x140001cb8
lea rdx, str.IX86
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
test eax, eax
je 0x140001f97
lea rdx, [0x140006730]
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
test eax, eax
je 0x140001f97
lea rdx, str.CHPE
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
test eax, eax
je 0x140001f97
lea rdx, [0x140006748]
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
test eax, eax
jne 0x140002390
mov eax, 0x8664
mov word [0x140009798], ax
mov eax, 3
mov word [0x140009794], ax
mov eax, 0xd0
jmp 0x140001cb8
lea rdx, str.nologo
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
test eax, eax
jne 0x140001e6b
lea r13d, [rax + 1]
jmp 0x140001fcb
lea rdx, [0x140006760]
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
test eax, eax
jne 0x140001e97
mov eax, 1
add edi, eax
add rsi, rax
mov rax, qword [rsp + 0x58]
mov r15, qword [rax + rsi*8]
jmp 0x140001fd0
mov r8d, 4
lea rdx, str.out:
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsnicmp]
test eax, eax
jne 0x140001eba
lea r15, [rbx + 8]
jmp 0x140001fcb
lea rdx, str.readonly
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
test eax, eax
je 0x140001fc6
lea rdx, [0x14000678c]
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
test eax, eax
je 0x140001fc6
mov r8d, 9
lea rdx, [0x140006790]
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsnicmp]
test eax, eax
jne 0x140001f29
lea rcx, [rbx + 0x12]
call fcn.140002484
lea rdx, [rsp + 0x68]
mov qword [rsp + 0x68], rax
call fcn.140002754
test eax, eax
je 0x140002380
jmp 0x140001fcb
lea rdx, str.verbose
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
test eax, eax
je 0x140001fb9
lea rdx, [0x1400067b8]
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
test eax, eax
je 0x140001fb9
lea rdx, str.Brepro
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
test eax, eax
jne 0x140001f6b
lea r14d, [rax + 1]
jmp 0x140001fcb
lea rdx, str.I386
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
test eax, eax
je 0x140001f97
lea rdx, str.IX86
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
test eax, eax
jne 0x140002390
mov eax, 0x14c
mov word [0x140009798], ax
mov eax, 7
mov word [0x140009794], ax
mov eax, 3
jmp 0x140001cb8
mov eax, 1
mov byte [0x140009791], al
jmp 0x140001fcb
mov byte [rsp + 0x50], 0
mov rax, qword [rsp + 0x58]
mov ecx, 1
mov rbx, r12
add edi, ecx
add rsi, rcx
cmp rsi, r12
jge 0x140001fef
mov edx, 0xfffd
jmp 0x140001be5
mov rbx, r12
mov sil, byte [rsp + 0x50]
mov byte [rsp + 0x50], sil
cmp edi, r12d
je 0x140002390
xor r12d, r12d
test r13b, r13b
jne 0x14000203f
jmp 0x14000200f
xor r12d, r12d
mov ecx, 0x1f43
call fcn.140004e14
mov rcx, rax
lea rdx, [0x140006628]
call fcn.1400028d8
mov ecx, 0x1f44
call fcn.140004e14
mov rcx, rax
call int.14000293c
call fcn.140002900
cmp word [0x140009798], r12w
jne 0x140002080
lea rdx, [0x140006748]
mov ecx, 0xfa1
call fcn.14000270c
mov eax, 0x8664
mov edx, 3
mov word [0x140009798], ax
mov eax, 0xd0
mov word [0x140009040], ax
mov word [0x140009794], dx
jmp 0x140002085
mov edx, 3
movsxd rdi, edi
mov r13d, 1
cmp rdi, rbx
jge 0x1400021cf
mov rsi, qword [rsp + 0x60]
mov ecx, 0x100
mov rax, qword [rsp + 0x58]
mov r8d, 0xfffd
mov rbx, qword [rax + rdi*8]
movzx eax, word [rbx]
sub ax, 0x2d
test r8w, ax
je 0x14000239b
mov qword [rsp + 0x40], rcx
lea rax, [rbp + 0x370]
mov qword [rsp + 0x38], rax
lea r9, [rbp + 0x170]
mov qword [rsp + 0x30], rcx
lea rax, [rsp + 0x70]
mov qword [rsp + 0x28], rax
mov r8, rdx
mov qword [rsp + 0x20], rcx
lea rdx, [rsp + 0x68]
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__wsplitpath_s]
cmp word [rbp + 0x370], r12w
jne 0x140002143
lea rax, str..res
mov edx, 0x104
mov qword [rsp + 0x28], rax
lea r9, [rbp + 0x170]
lea rax, [rsp + 0x70]
lea r8, [rsp + 0x68]
mov qword [rsp + 0x20], rax
lea rcx, [rbp + 0x570]
call qword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__wmakepath_s]
lea rbx, [rbp + 0x570]
test r15, r15
jne 0x140002183
lea rax, str..obj
mov edx, 0x104
mov qword [rsp + 0x28], rax
lea r9, [rbp + 0x170]
lea rax, [rsp + 0x70]
lea r8, [rsp + 0x68]
mov qword [rsp + 0x20], rax
lea rcx, [rbp + 0x780]
call qword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__wmakepath_s]
lea r15, [rbp + 0x780]
cmp qword [0x1400097b0], r12
jne 0x140002194
mov rcx, r15
call fcn.140003728
mov r8d, 0x104
lea rcx, [rbp + 0x990]
mov rdx, rbx
call qword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__wfullpath]
test rax, rax
cmove rax, rbx
mov rcx, rax
call fcn.140004044
add rdi, r13
mov ecx, 0x100
mov edx, 3
cmp rdi, rsi
jl 0x1400020a1
call qword [sym.imp.api_ms_win_crt_time_l1_1_0.dll__tzset]
or ebx, 0xffffffff
test r14b, r14b
je 0x1400021e1
mov eax, ebx
jmp 0x1400021e9
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_time_l1_1_0.dll__time64]
mov dl, byte [rsp + 0x50]
mov r8d, eax
mov rcx, r15
call fcn.1400046c8
test r14b, r14b
je 0x140002346
lea rdx, str..NUL
mov rcx, r15
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
test eax, eax
je 0x140002346
mov eax, 0x80
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x28], eax
xor r9d, r9d
mov eax, 3
xor r8d, r8d
mov edx, 0xc0000000
mov dword [rsp + 0x20], eax
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rsi, rax
cmp rax, 0xffffffffffffffff
je 0x1400023a4
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov r14d, eax
cmp eax, ebx
je 0x1400023a4
xor r9d, r9d
mov qword [rsp + 0x28], r12
xor edx, edx
mov dword [rsp + 0x20], eax
mov rcx, rsi
lea r8d, [r9 + 4]
call qword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov rdi, rax
test rax, rax
je 0x1400023a4
xor r9d, r9d
mov qword [rsp + 0x20], r12
xor r8d, r8d
mov edx, 0xf001f
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov rbx, rax
test rax, rax
jne 0x1400022c5
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, rdi
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x1400023ac
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x1400023a4
lea r9, [rsp + 0x68]
mov qword [rsp + 0x58], r12
lea r8, [rsp + 0x58]
mov edx, r14d
mov rcx, rbx
call fcn.140001884
test eax, eax
je 0x1400023a4
mov rcx, qword [rsp + 0x58]
mov eax, dword [rcx]
or eax, 0xc0000000
cmp word [rbx], r12w
jne 0x140002321
mov edx, 0xffff
cmp word [rbx + 2], dx
jne 0x140002321
cmp word [rbx + 4], r12w
je 0x140002324
mov dword [rbx + 8], eax
jmp 0x140002324
mov dword [rbx + 4], eax
mov rdx, r13
call fcn.140005240
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
test eax, eax
je 0x1400023a4
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x1400023a4
xor eax, eax
mov rcx, qword [rbp + 0xba0]
xor rcx, rsp
call fcn.140005220
lea r11, [rsp + 0xcb0]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x40]
mov rdi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret
xor ecx, ecx
call fcn.140001a74
int3
mov edx, 1
mov ecx, 0x44e
call fcn.1400026a4
int3
mov ecx, 1
call fcn.140001a74
int3
mov ecx, r13d
call fcn.140001a74
int3
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov r8d, ebx
mov rdx, r15
mov ecx, 0x457
call fcn.1400026a4
int3