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

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x3b0]
sub rsp, 0x4b0
mov rax, qword [0x180131010]
xor rax, rsp
mov qword [rbp + 0x3a0], rax
xor esi, esi
mov rcx, qword [0x180140e98]
mov rdx, qword [0x180140ea0]
cmp rcx, rdx
je 0x180004c10
call fcn.180002000
mov rax, qword [0x180140e98]
mov qword [0x180140ea0], rax
lea rcx, str.APPDATA
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
xorps xmm0, xmm0
movups xmmword [rbp + 0xa0], xmm0
mov qword [rbp + 0xb0], rsi
mov qword [rbp + 0xb8], rsi
mov r15, 0xffffffffffffffff
mov r8, r15
nop
inc r8
cmp byte [rax + r8], sil
jne 0x180004c40
mov rdx, rax
lea rcx, [rbp + 0xa0]
call fcn.18000d700
nop
xorps xmm0, xmm0
movups xmmword [rbp + 0xc0], xmm0
mov qword [rbp + 0xd0], rsi
mov qword [rbp + 0xd8], rsi
mov r8d, 8
lea rdx, str.configs
lea rcx, [rbp + 0xc0]
call fcn.18000d700
nop
movabs rax, 0x7fffffffffffffff
mov rcx, qword [rbp + 0xb0]
sub rax, rcx
mov rdx, qword [rbp + 0xd0]
cmp rax, rdx
jb 0x18000550a
lea r9, [rbp + 0xa0]
cmp qword [rbp + 0xb8], 0x10
cmovae r9, qword [rbp + 0xa0]
lea rax, [rbp + 0xc0]
cmp qword [rbp + 0xd8], 0x10
cmovae rax, qword [rbp + 0xc0]
mov qword [rsp + 0x30], rdx
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rcx
lea r8, [rbp + 0xa0]
movzx edx, byte [rsp + 0x40]
lea rcx, [rbp + 0x50]
call fcn.18000e330
nop
lea rcx, [rbp + 0x50]
cmp qword [rbp + 0x68], 0x10
cmovae rcx, qword [rbp + 0x50]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x180004d24
test al, 0x10
mov eax, 1
jne 0x180004d26
mov eax, esi
test eax, eax
jne 0x180004dde
lea rdi, [rbp + 0x50]
cmp qword [rbp + 0x68], 0x10
cmovae rdi, qword [rbp + 0x50]
mov rbx, r15
nop
inc rbx
cmp byte [rdi + rbx], 0
jne 0x180004d40
call fcn.18009a0b4
mov qword [rsp + 0x70], rdi
mov qword [rsp + 0x78], rbx
lea r8, [rsp + 0x70]
mov edx, eax
lea rcx, [rbp - 0x50]
call fcn.180003600
nop
mov qword [rbp + 0x90], rsi
lea rax, [0x1801355b8]
mov qword [rbp + 0x98], rax
lea rdx, [rbp + 0x90]
lea rcx, [rbp - 0x50]
call fcn.180004940
cmp dword [rbp + 0x90], 0
jne 0x180005510
mov rdx, qword [rbp - 0x38]
cmp rdx, 8
jb 0x180004dde
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x50]
mov rax, rcx
cmp rdx, 0x1000
jb 0x180004dd9
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x180004dd9
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.18007017c
mov rdi, qword [rbp + 0x60]
lea rbx, [rbp + 0x50]
cmp qword [rbp + 0x68], 0x10
cmovae rbx, qword [rbp + 0x50]
call fcn.18009a0b4
mov qword [rbp - 0x80], rbx
mov qword [rbp - 0x78], rdi
lea r8, [rbp - 0x80]
mov edx, eax
lea rcx, [rbp - 0x30]
call fcn.180003600
nop
xorps xmm0, xmm0
movdqa xmmword [rbp + 0x40], xmm0
lea rdx, [rbp - 0x30]
lea rcx, [rbp + 0x40]
call fcn.18000cb60
test eax, eax
jne 0x180005521
mov rdx, qword [rbp - 0x18]
cmp rdx, 8
jb 0x180004e6d
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x30]
mov rax, rcx
cmp rdx, 0x1000
jb 0x180004e68
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x180004e68
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.18007017c
xorps xmm0, xmm0
movups xmmword [rbp + 0x30], xmm0
mov rcx, qword [rbp + 0x48]
test rcx, rcx
je 0x180004e85
lock inc dword [rcx + 8]
mov rcx, qword [rbp + 0x48]
movaps xmm0, xmmword [rbp + 0x40]
movdqa xmmword [rbp + 0x30], xmm0
test rcx, rcx
je 0x180004e9b
lock inc dword [rcx + 8]
mov rcx, qword [rbp + 0x48]
xorps xmm1, xmm1
movdqu xmmword [rbp + 0x140], xmm1
test rcx, rcx
je 0x180004edc
mov eax, r15d
lock xadd dword [rcx + 8], eax
cmp eax, 1
jne 0x180004edc
mov rbx, qword [rbp + 0x48]
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax]
mov eax, r15d
lock xadd dword [rbx + 0xc], eax
cmp eax, 1
jne 0x180004edc
mov rcx, qword [rbp + 0x48]
mov rax, qword [rcx]
call qword [rax + 8]
nop
nop dword [rax]
mov rdi, qword [rbp + 0x30]
test rdi, rdi
je 0x18000538a
lea rbx, [rdi + 0x20]
mov rcx, rbx
cmp qword [rbx + 0x18], 8
jb 0x180004efe
mov rcx, qword [rbx]
lea rsi, [rbx + 0x10]
mov rax, qword [rsi]
mov qword [rbp - 0x70], rcx
mov qword [rbp - 0x68], rax
call fcn.18009a0b4
movaps xmm0, xmmword [rbp - 0x70]
movdqa xmmword [rbp - 0x10], xmm0
lea r8, [rbp - 0x10]
mov edx, eax
lea rcx, [rbp + 0x120]
call fcn.18000c8a0
nop
mov rax, qword [rbp + 0x130]
lea rcx, [rax - 5]
xorps xmm0, xmm0
movups xmmword [rbp + 0xe0], xmm0
xor edx, edx
mov qword [rbp + 0xf0], rdx
mov qword [rbp + 0xf8], rdx
cmp rax, rcx
jb 0x180005504
sub rax, rcx
mov r8d, 5
cmp rax, r8
cmovb r8, rax
lea rdx, [rbp + 0x120]
cmp qword [rbp + 0x138], 0x10
cmovae rdx, qword [rbp + 0x120]
add rdx, rcx
lea rcx, [rbp + 0xe0]
call fcn.18000d700
nop
lea rdx, [rbp + 0xe0]
mov r13, qword [rbp + 0xf8]
cmp r13, 0x10
setae r12b
mov r14, qword [rbp + 0xe0]
cmovae rdx, r14
cmp qword [rbp + 0xf0], 5
jne 0x180005241
xor ecx, ecx
lea r8, str..scfg
nop dword [rax + rax]
movzx eax, byte [rdx + rcx]
inc rcx
cmp al, byte [r8 + rcx - 1]
jne 0x180004fe8
cmp rcx, 5
jne 0x180004fd0
xor eax, eax
jmp 0x180004fed
sbb eax, eax
or eax, 1
test eax, eax
jne 0x180005241
cmp qword [rbx + 0x18], 8
jb 0x180004fff
mov rbx, qword [rbx]
mov rax, qword [rsi]
mov qword [rbp - 0x60], rbx
mov qword [rbp - 0x58], rax
call fcn.18009a0b4
movaps xmm0, xmmword [rbp - 0x60]
movdqa xmmword [rbp], xmm0
lea r8, [rbp]
mov edx, eax
lea rcx, [rsp + 0x50]
call fcn.18000c8a0
nop
lea rdx, [rsp + 0x50]
cmp qword [rsp + 0x68], 0x10
setae r11b
mov r10, qword [rsp + 0x50]
cmovae rdx, r10
mov r9, qword [rsp + 0x60]
test r9, r9
je 0x1800050bc
lea rcx, [r9 - 1]
mov rax, r9
cmp rcx, r9
cmovb rax, rcx
add rax, rdx
cmp byte [rax], 0x5c
je 0x18000506e
cmp rax, rdx
je 0x1800050bc
dec rax
cmp byte [rax], 0x5c
jne 0x180005061
sub rax, rdx
cmp rax, 0xffffffffffffffff
je 0x1800050bc
mov r8, r9
sub r8, rax
lea rcx, [rax + 1]
xorps xmm0, xmm0
movups xmmword [rbp + 0x70], xmm0
xor esi, esi
mov qword [rbp + 0x80], rsi
mov qword [rbp + 0x88], rsi
cmp r9, rcx
jb 0x18000552d
sub r9, rcx
cmp r9, r8
cmovb r8, r9
lea rdx, [rsp + 0x50]
test r11b, r11b
cmovne rdx, r10
add rdx, rcx
jmp 0x1800050dd
xorps xmm0, xmm0
movups xmmword [rbp + 0x70], xmm0
xor esi, esi
mov qword [rbp + 0x80], rsi
mov qword [rbp + 0x88], rsi
xor r8d, r8d
lea rdx, [0x1800d72c8]
lea rcx, [rbp + 0x70]
call fcn.18000d700
nop
mov rdx, qword [rsp + 0x68]
cmp rdx, 0x10
jb 0x180005124
inc rdx
mov rcx, qword [rsp + 0x50]
mov rax, rcx
cmp rdx, 0x1000
jb 0x18000511f
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x180005367
call fcn.18007017c
mov qword [rsp + 0x60], rsi
mov qword [rsp + 0x68], send
mov byte [rsp + 0x50], 0
mov rax, qword [rbp + 0x80]
lea r8, [rax - 5]
xorps xmm0, xmm0
movups xmmword [rbp + 0x100], xmm0
mov qword [rbp + 0x110], rsi
mov qword [rbp + 0x118], rsi
cmp rax, r8
cmovb r8, rax
lea rdx, [rbp + 0x70]
cmp qword [rbp + 0x88], 0x10
cmovae rdx, qword [rbp + 0x70]
lea rcx, [rbp + 0x100]
call fcn.18000d700
nop
mov rax, qword [0x180140ea0]
cmp rax, qword [0x180140ea8]
je 0x1800051a8
lea rdx, [rbp + 0x100]
mov rcx, rax
call fcn.180001e20
add qword [0x180140ea0], 0x20
jmp 0x1800051bf
lea r8, [rbp + 0x100]
mov rdx, rax
lea rcx, [0x180140e98]
call fcn.180002280
nop
mov rdx, qword [rbp + 0x118]
cmp rdx, 0x10
jb 0x180005201
inc rdx
mov rcx, qword [rbp + 0x100]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1800051fb
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x18000536e
call fcn.18007017c
nop
mov rdx, qword [rbp + 0x88]
cmp rdx, 0x10
jb 0x180005243
inc rdx
mov rcx, qword [rbp + 0x70]
mov rax, rcx
cmp rdx, 0x1000
jb 0x18000523a
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x180005375
call fcn.18007017c
jmp 0x180005243
xor esi, esi
test r12b, r12b
je 0x18000527a
lea rdx, [r13 + 1]
mov rax, r14
cmp rdx, 0x1000
jb 0x180005271
add rdx, 0x27
mov r14, qword [r14 - 8]
sub rax, r14
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x18000537c
mov rcx, r14
call fcn.18007017c
nop
mov rdx, qword [rbp + 0x138]
cmp rdx, 0x10
jb 0x1800052c0
inc rdx
mov rcx, qword [rbp + 0x120]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1800052b6
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x180005383
call fcn.18007017c
nop dword [rax + rax]
lea rdx, [rbp + 0x150]
mov rcx, qword [rdi + 0x40]
call fcn.18009a38c
cmp eax, 0x12
je 0x180005317
test eax, eax
jne 0x180005533
cmp word [rbp + 0x17c], 0x2e
jne 0x180005303
movzx eax, word [rbp + 0x17e]
test ax, ax
je 0x1800052c0
cmp ax, 0x2e
jne 0x180005303
cmp word [rbp + 0x180], 0
je 0x1800052c0
lea rdx, [rbp + 0x150]
mov rcx, rdi
call fcn.180004710
jmp 0x180004ee4
mov rdi, rsi
mov qword [rbp + 0x30], rsi
mov rbx, qword [rbp + 0x38]
mov qword [rbp + 0x38], rsi
test rbx, rbx
je 0x180004ee4
mov eax, r15d
lock xadd dword [rbx + 8], eax
cmp eax, 1
jne 0x180004ee0
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax]
mov eax, r15d
lock xadd dword [rbx + 0xc], eax
cmp eax, 1
jne 0x180004ee0
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax + 8]
jmp 0x180004ee0
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
mov rcx, qword [rbp + 0x38]
test rcx, rcx
je 0x1800053c4
mov eax, r15d
lock xadd dword [rcx + 8], eax
cmp eax, 1
jne 0x1800053c4
mov rbx, qword [rbp + 0x38]
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax]
mov eax, r15d
lock xadd dword [rbx + 0xc], eax
cmp eax, 1
jne 0x1800053c4
mov rcx, qword [rbp + 0x38]
mov rax, qword [rcx]
call qword [rax + 8]
nop
mov rcx, qword [rbp + 0x48]
test rcx, rcx
je 0x1800053fd
mov eax, r15d
lock xadd dword [rcx + 8], eax
cmp eax, 1
jne 0x1800053fd
mov rbx, qword [rbp + 0x48]
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax]
lock xadd dword [rbx + 0xc], r15d
cmp r15d, 1
jne 0x1800053fd
mov rcx, qword [rbp + 0x48]
mov rax, qword [rcx]
call qword [rax + 8]
nop
mov rdx, qword [rbp + 0x68]
cmp rdx, 0x10
jb 0x18000543b
inc rdx
mov rcx, qword [rbp + 0x50]
mov rax, rcx
cmp rdx, 0x1000
jb 0x180005436
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x180005436
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.18007017c
mov qword [rbp + 0x60], rsi
mov qword [rbp + 0x68], send
mov byte [rbp + 0x50], 0
mov rdx, qword [rbp + 0xd8]
cmp rdx, 0x10
jb 0x180005490
inc rdx
mov rcx, qword [rbp + 0xc0]
mov rax, rcx
cmp rdx, 0x1000
jb 0x18000548a
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x18000548a
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.18007017c
nop
mov rdx, qword [rbp + 0xb8]
cmp rdx, 0x10
jb 0x1800054d4
inc rdx
mov rcx, qword [rbp + 0xa0]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1800054cf
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1800054cf
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.18007017c
mov rcx, qword [rbp + 0x3a0]
xor rcx, rsp
call fcn.18006fda0
lea r11, [rsp + 0x4b0]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rdi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret
call fcn.18000c550
nop
call fcn.180001960
nop
lea r8, [rbp - 0x50]
lea rdx, [rbp + 0x90]
call fcn.180004520
nop
lea r8, [rbp - 0x30]
mov edx, eax
call fcn.1800044b0
nop
call fcn.18000c550
nop
mov edx, eax
call fcn.1800043c0
int3