Function at 0x140005190
Capabilities:
Check if file exists
Get file attributes
Query environment variable

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0xa20]
sub rsp, 0xb20
mov qword [rsp + 0x50], 0xfffffffffffffffe
mov qword [rsp + 0xb70], rbx
mov rax, qword [0x14011c018]
xor rax, rsp
mov qword [rbp + 0xa10], rax
mov rax, rdx
mov qword [rsp + 0x30], rdx
mov r13, rcx
test rdx, rdx
je 0x140005206
xor edi, edi
mov qword [rbp - 0x30], rdi
mov rdx, qword [rcx]
lea rcx, [rbp - 0x30]
call fcn.140001c04
nop
mov rax, qword [r13]
cmp byte [rax + 0x80], dil
jne 0x14000520d
lea rcx, [rbp - 0x30]
call fcn.140001c2c
xor al, al
jmp 0x1400058f5
mov dword [rbp - 0x28], 8
mov dword [rbp - 0x24], 0xff
lea rcx, str.COMCTL32.DLL
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
lea rdx, str.InitCommonControlsEx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
je 0x140005243
lea rcx, [rbp - 0x28]
call rax
lea rcx, [0x1400e6fd8]
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
lea rdx, [0x1400e6fe8]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [rsp + 0x48], rax
test rax, rax
je 0x140005744
mov rbx, qword [r13]
lea rcx, [rbx + 0xa8]
call fcn.140002da0
test al, al
jne 0x140005742
lea rcx, [rbx + 0x88]
call fcn.140002da0
test al, al
jne 0x140005742
lea rdx, [rbx + 0xa8]
lea rcx, [rbp - 0x20]
call fcn.140002e64
nop
lea rcx, [0x1400e6ff4]
call fcn.140001de4
mov r14, rax
lea rcx, [rbp - 0x20]
call fcn.140001ca0
mov rdi, rax
mov rsi, qword [rax + 0x10]
mov r12, qword [rax + 0x18]
mov rcx, r12
sub rcx, rsi
cmp r14, rcx
ja 0x14000531a
lea r15, [rsi + r14]
mov qword [rax + 0x10], r15
mov rbx, rax
cmp r12, 8
jb 0x1400052ed
mov rbx, qword [rax]
lea rcx, [rbx + rsi*2]
mov r8, r14
lea rdx, [0x1400e6ff4]
call fcn.140001ddc
xor eax, eax
mov word [rsp + 0x20], ax
lea rcx, [rbx + r15*2]
lea rdx, [rsp + 0x20]
call fcn.140001dd4
jmp 0x1400054e7
lea rcx, [rbp - 0x20]
call fcn.140001f74
sub rax, rsi
cmp rax, r14
jb 0x140005925
lea r15, [rsi + r14]
lea rcx, [rbp - 0x20]
call fcn.140001f74
mov rbx, rax
lea rcx, [rbp - 0x20]
call fcn.140001ca0
mov rcx, r15
or rcx, 7
mov qword [rsp + 0x40], rcx
cmp rcx, rbx
ja 0x140005389
mov rdx, qword [rax + 0x18]
mov rcx, rdx
shr rcx, 1
mov rax, rbx
sub rax, rcx
cmp rdx, rax
ja 0x140005389
lea rax, [rcx + rdx]
mov qword [rsp + 0x38], rax
lea rdx, [rsp + 0x38]
lea rcx, [rsp + 0x40]
call fcn.140001d84
mov rbx, qword [rax]
lea rax, [rbx + 1]
lea rdx, [rax + rax]
movabs rcx, 0x7fffffffffffffff
cmp rax, rcx
jbe 0x1400053ac
mov rax, 0xffffffffffffffff
mov rdx, rax
jmp 0x1400053bc
cmp rdx, 0x1000
jb 0x1400053e6
mov rax, 0xffffffffffffffff
lea rcx, [rdx + 0x27]
cmp rcx, rdx
cmovbe rcx, rax
call fcn.1400a08c4
mov rcx, rax
test rax, rax
je 0x14000592b
add rax, 0x27
and rax, 0xffffffffffffffe0
mov qword [rax - 8], rcx
jmp 0x1400053f7
test rdx, rdx
je 0x1400053f5
mov rcx, rdx
call fcn.1400a08c4
jmp 0x1400053f7
xor eax, eax
mov qword [rsp + 0x28], rax
mov qword [rdi + 0x10], r15
mov qword [rdi + 0x18], rbx
mov r15, qword [rsp + 0x28]
mov r8, rsi
mov rcx, r15
cmp r12, 8
jb 0x14000548b
mov rbx, qword [rdi]
mov rdx, rbx
call fcn.140001ddc
lea rcx, [r15 + rsi*2]
mov r8, r14
lea rdx, [0x1400e6ff4]
call fcn.140001ddc
xor eax, eax
mov word [rsp + 0x20], ax
lea rax, [rsi + r14]
lea rcx, [r15 + rax*2]
lea rdx, [rsp + 0x20]
call fcn.140001dd4
lea rdx, [r12*2 + 2]
cmp rdx, 0x1000
jb 0x140005479
add rdx, 0x27
mov rcx, qword [rbx - 8]
sub rbx, rcx
lea rax, [rbx - 8]
cmp rax, 0x1f
ja 0x140005931
mov rbx, rcx
mov rcx, rbx
call fcn.1400a0900
mov rax, qword [rsp + 0x28]
mov qword [rdi], rax
jmp 0x1400054e7
mov rdx, rdi
call fcn.140001ddc
lea rcx, [r15 + rsi*2]
mov r8, r14
lea rdx, [0x1400e6ff4]
call fcn.140001ddc
xor eax, eax
mov word [rsp + 0x20], ax
lea rax, [rsi + r14]
lea rcx, [r15 + rax*2]
lea rdx, [rsp + 0x20]
call fcn.140001dd4
mov rcx, rdi
call fcn.140001ca0
mov rdx, rax
mov ecx, 8
call fcn.140001bf0
mov rbx, rax
lea rcx, [rsp + 0x28]
call fcn.140001ca0
mov rcx, qword [rax]
mov qword [rbx], rcx
mov r15, qword [rsp + 0x30]
mov rcx, r15
call fcn.140001de4
mov r14, rax
mov rsi, qword [rdi + 0x10]
mov r12, qword [rdi + 0x18]
mov rcx, r12
sub rcx, rsi
cmp rax, rcx
ja 0x140005544
lea rbx, [rsi + rax]
mov qword [rdi + 0x10], rbx
cmp r12, 8
jb 0x14000551b
mov rdi, qword [rdi]
lea rcx, [rdi + rsi*2]
mov r8, r14
mov rdx, r15
call fcn.140001ddc
xor eax, eax
mov word [rsp + 0x20], ax
lea rcx, [rdi + rbx*2]
lea rdx, [rsp + 0x20]
call fcn.140001dd4
jmp 0x14000570d
lea rcx, [rbp - 0x20]
call fcn.140001f74
sub rax, rsi
cmp rax, r14
jb 0x140005937
lea r15, [rsi + r14]
lea rcx, [rbp - 0x20]
call fcn.140001f74
mov rbx, rax
lea rcx, [rbp - 0x20]
call fcn.140001ca0
mov rcx, r15
or rcx, 7
mov qword [rsp + 0x38], rcx
cmp rcx, rbx
ja 0x1400055b3
mov rdx, qword [rax + 0x18]
mov rcx, rdx
shr rcx, 1
mov rax, rbx
sub rax, rcx
cmp rdx, rax
ja 0x1400055b3
lea rax, [rcx + rdx]
mov qword [rsp + 0x40], rax
lea rdx, [rsp + 0x40]
lea rcx, [rsp + 0x38]
call fcn.140001d84
mov rbx, qword [rax]
lea rax, [rbx + 1]
lea rdx, [rax + rax]
movabs rcx, 0x7fffffffffffffff
cmp rax, rcx
jbe 0x1400055d6
mov rax, 0xffffffffffffffff
mov rdx, rax
jmp 0x1400055e6
cmp rdx, 0x1000
jb 0x140005610
mov rax, 0xffffffffffffffff
lea rcx, [rdx + 0x27]
cmp rcx, rdx
cmovbe rcx, rax
call fcn.1400a08c4
mov rcx, rax
test rax, rax
je 0x14000593d
add rax, 0x27
and rax, 0xffffffffffffffe0
mov qword [rax - 8], rcx
jmp 0x140005621
test rdx, rdx
je 0x14000561f
mov rcx, rdx
call fcn.1400a08c4
jmp 0x140005621
xor eax, eax
mov qword [rsp + 0x28], rax
mov qword [rdi + 0x10], r15
mov qword [rdi + 0x18], rbx
mov r15, qword [rsp + 0x28]
mov r8, rsi
mov rcx, r15
cmp r12, 8
jb 0x1400056b3
mov rbx, qword [rdi]
mov rdx, rbx
call fcn.140001ddc
lea rcx, [r15 + rsi*2]
mov r8, r14
mov rdx, qword [rsp + 0x30]
call fcn.140001ddc
xor eax, eax
mov word [rsp + 0x20], ax
lea rax, [rsi + r14]
lea rcx, [r15 + rax*2]
lea rdx, [rsp + 0x20]
call fcn.140001dd4
lea rdx, [r12*2 + 2]
cmp rdx, 0x1000
jb 0x1400056a1
add rdx, 0x27
mov rcx, qword [rbx - 8]
sub rbx, rcx
lea rax, [rbx - 8]
cmp rax, 0x1f
ja 0x14000591f
mov rbx, rcx
mov rcx, rbx
call fcn.1400a0900
mov rax, qword [rsp + 0x28]
mov qword [rdi], rax
jmp 0x14000570d
mov rdx, rdi
call fcn.140001ddc
lea rcx, [r15 + rsi*2]
mov r8, r14
mov rdx, qword [rsp + 0x30]
call fcn.140001ddc
xor eax, eax
mov word [rsp + 0x20], ax
lea rax, [rsi + r14]
lea rcx, [r15 + rax*2]
lea rdx, [rsp + 0x20]
call fcn.140001dd4
mov rcx, rdi
call fcn.140001ca0
mov rdx, rax
mov ecx, 8
call fcn.140001bf0
mov rbx, rax
lea rcx, [rsp + 0x28]
call fcn.140001ca0
mov rcx, qword [rax]
mov qword [rbx], rcx
mov rcx, qword [r13]
add rcx, 0x88
call fcn.140001c60
mov rbx, rax
lea rcx, [rbp - 0x20]
call fcn.140001c60
mov rdx, rax
xor r9d, r9d
mov r8, rbx
xor ecx, ecx
call qword [rsp + 0x48]
nop
lea rcx, [rbp - 0x20]
call fcn.140001c70
xor edi, edi
xor edx, edx
mov r8d, 0x208
lea rcx, [rbp]
call fcn.1400a2390
mov rbx, qword [r13]
lea rcx, [rbx + 0xc8]
call fcn.140001c60
mov r8d, 0x103
lea rdx, [rbp]
lea rcx, [rbp]
sub rax, rcx
nop word [rax + rax]
lea rcx, [r8 + 0x7ffffefb]
test rcx, rcx
je 0x1400057a2
movzx ecx, word [rax + rdx]
test cx, cx
je 0x1400057a2
mov word [rdx], cx
add rdx, 2
sub r8, 1
jne 0x140005780
lea rax, [rdx - 2]
test r8, r8
cmovne rax, rdx
mov word [rax], di
cmp word [rbp], 0
je 0x1400058ea
cmp byte [rbx + 0xe8], 0
je 0x1400057d6
lea rcx, [rbp]
call fcn.140008030
mov word [rbp], di
jmp 0x1400058ea
xor edx, edx
mov r8d, 0x800
lea rcx, [rbp + 0x210]
call fcn.1400a2390
mov r8d, 0x3fe
lea rdx, [rbp + 0x210]
lea rcx, str._programfiles_Internet_Exploreriexplore.exe
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
dec eax
cmp eax, 0x3fd
ja 0x140005823
lea rcx, [rbp + 0x210]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x140005823
test al, 0x10
je 0x140005868
mov r8d, 0x3fe
lea rdx, [rbp + 0x210]
lea rcx, str._programfiles_x86__Internet_Exploreriexplore.exe
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
dec eax
cmp eax, 0x3fd
ja 0x1400058ea
lea rcx, [rbp + 0x210]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x1400058ea
test al, 0x10
jne 0x1400058ea
xor eax, eax
mov qword [rbp - 0x6c], rax
mov qword [rbp - 0x64], rax
mov qword [rbp - 0x5c], rax
mov qword [rbp - 0x54], rax
mov qword [rbp - 0x4c], rax
mov qword [rbp - 0x44], rax
mov dword [rbp - 0x3c], eax
mov qword [rsp + 0x60], 0x70
mov qword [rsp + 0x68], rdi
mov qword [rsp + 0x70], rdi
lea rax, [rbp + 0x210]
mov qword [rsp + 0x78], rax
lea rax, [rbp]
mov qword [rbp - 0x80], rax
mov qword [rbp - 0x78], rdi
mov dword [rbp - 0x70], 1
mov qword [rbp - 0x38], rdi
lea rcx, [0x1400e70c8]
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
test rax, rax
je 0x1400058ea
lea rdx, str.ShellExecuteExW
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
je 0x1400058ea
lea rcx, [rsp + 0x60]
call rax
nop
lea rcx, [rbp - 0x30]
call fcn.140001c2c
mov al, 1
mov rcx, qword [rbp + 0xa10]
xor rcx, rsp
call fcn.1400a08a0
mov rbx, qword [rsp + 0xb70]
add rsp, 0xb20
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
call fcn.1400a4d80
nop
call fcn.140001f60
int3
call fcn.1400a4d80
int3
call fcn.1400a4d80
int3
call fcn.140001f60
int3
call fcn.1400a4d80
int3