Function at 0x42f1b0
Capabilities:
Get common file path
Query environment variable

Disassembly:
push ebp
lea ebp, [esp - 0x20c]
sub esp, 0x20c
push 0xffffffffffffffff
push 0x49fd58
mov eax, dword fs:[0]
push eax
sub esp, 0x54
mov eax, dword [0x4d6720]
xor eax, ebp
mov dword [ebp + 0x208], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov ecx, dword [ebp + 0x218]
mov eax, dword [ebp + 0x214]
mov dword [ebp - 0x44], ecx
xor edi, edi
push eax
lea ecx, [ebp - 0x14]
mov dword [ebp - 0x34], edi
call fcn.00403c10
push str.__t_r_n
push str.__t_r_n
lea ecx, [ebp - 0x14]
mov dword [ebp - 4], edi
call fcn.00403a90
mov ecx, eax
call fcn.004039b0
push eax
lea ecx, [ebp - 0x14]
call fcn.00401a50
call fcn.00468b49
xor ecx, ecx
cmp eax, edi
setne cl
cmp ecx, edi
jne 0x42f248
push 0x80004005
call fcn.00401210
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax - 0xc]
cmp ecx, edi
mov byte [ebp - 4], 1
jle 0x42f2bd
jge 0x42f271
push 0x80070057
call fcn.00401210
movzx ecx, word [eax]
cmp cx, 0x22
jne 0x42f2bd
mov eax, dword [eax - 0xc]
dec eax
push eax
lea ecx, [ebp - 0x30]
push ecx
lea ecx, [ebp - 0x14]
call fcn.004068e0
push eax
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 2
call fcn.00401a50
mov eax, dword [ebp - 0x30]
add eax, 0xfffffff0
mov byte [ebp - 4], 1
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x42f2c9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x42f2c9
lea ecx, [ebp - 0x14]
push ecx
lea ecx, [ebp - 0x28]
call fcn.00401a50
mov esi, dword [ebp - 0x28]
push esi
call fcn.0042a2e0
add esp, 4
test eax, eax
je 0x42f32a
lea eax, [esi - 0x10]
mov byte [ebp - 4], 0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x42f2f9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x42f31f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp + 0x21c]
jmp 0x42f979
lea ecx, [ebp - 0x14]
push ecx
call fcn.0042e330
mov ecx, dword [ebp - 0x14]
add esp, 4
cmp dword [ecx - 4], 1
jle 0x42f34e
mov edx, dword [ecx - 0xc]
push edx
lea ecx, [ebp - 0x14]
call fcn.004013e0
mov ecx, dword [ebp - 0x14]
cmp dword [ecx - 0xc], edi
mov dword [ebp - 0x24], ecx
jle 0x42f3bb
push 0x3a
push ecx
call fcn.00482e2a
mov ecx, dword [ebp - 0x14]
add esp, 8
cmp eax, edi
je 0x42f375
sub eax, ecx
sar eax, 1
cmp eax, 0xffffffff
jne 0x42f82e
cmp dword [ecx - 0xc], edi
jle 0x42f3bb
push 0x2f
push ecx
call fcn.00482e2a
mov ecx, dword [ebp - 0x14]
add esp, 8
cmp eax, edi
je 0x42f399
sub eax, ecx
sar eax, 1
cmp eax, 0xffffffff
jne 0x42f82e
cmp dword [ecx - 0xc], edi
jle 0x42f3bb
push 0x5c
push ecx
call fcn.00482e2a
add esp, 8
cmp eax, edi
je 0x42f3bb
sub eax, dword [ebp - 0x14]
sar eax, 1
cmp eax, 0xffffffff
jne 0x42f82e
mov dword [ebp - 0x20], edi
mov edi, edi
cmp edi, 2
jge 0x42f92d
cmp edi, 1
jne 0x42f3fe
mov eax, dword [ebp - 0x24]
push 0x20
push eax
call fcn.00482e2a
add esp, 8
test eax, eax
je 0x42f823
cmp eax, dword [ebp - 0x24]
jb 0x42f823
mov ecx, dword [ebp - 0x24]
sub eax, ecx
sar eax, 1
shr eax, 1
xor edx, edx
mov word [ecx + eax*2], dx
jmp 0x42f401
mov ecx, dword [ebp - 0x24]
mov ebx, ecx
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x3c], ebx
call fcn.00468b49
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x42f427
push 0x80004005
call fcn.00401210
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x1c], eax
mov byte [ebp - 4], 3
call fcn.00468b49
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x42f454
push 0x80004005
call fcn.00401210
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x2c], eax
xor eax, eax
mov byte [ebp - 4], 4
mov dword [ebp - 0x38], eax
lea esp, [esp]
cmp eax, 3
ja case.default.0x42f479
jmp dword [eax*4 + 0x42fb18]
push ebx
lea ecx, [ebp - 0x1c]
call fcn.00401d90
jmp 0x42f745
lea ecx, [ebp]
push ecx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
test eax, eax
je 0x42f745
push 1
lea edx, [ebp]
push edx
lea eax, [ebp - 0x54]
push eax
call fcn.00443f20
mov eax, dword [eax]
push ebx
push eax
lea ecx, [ebp - 0x1c]
push str._s_s
push ecx
mov byte [ebp - 4], 5
call fcn.00404580
mov eax, dword [ebp - 0x54]
add eax, 0xfffffff0
add esp, 0x1c
mov byte [ebp - 4], 4
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x42f745
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x42f745
push 0x104
lea ecx, [ebp]
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
je 0x42f745
push 1
lea edx, [ebp]
push edx
lea eax, [ebp - 0x58]
push eax
call fcn.00443f20
mov eax, dword [eax]
push ebx
push eax
lea ecx, [ebp - 0x1c]
push str._s_s
push ecx
mov byte [ebp - 4], 6
call fcn.00404580
mov eax, dword [ebp - 0x58]
jmp 0x42f4cd
push 0x104
lea ecx, [ebp]
push ecx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
test eax, eax
je 0x42f745
push 1
lea edx, [ebp]
push edx
lea eax, [ebp - 0x60]
push eax
call fcn.00443f20
mov eax, dword [eax]
push ebx
push eax
lea ecx, [ebp - 0x1c]
push str._s_s
push ecx
mov byte [ebp - 4], 7
call fcn.00404580
mov eax, dword [ebp - 0x60]
jmp 0x42f4cd
xor edi, edi
push edi
push edi
push 0x4ad8f4
mov dword [ebp - 0x30], edi
mov dword [ebp - 0x40], edi
mov byte [ebp - 4], 8
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov esi, eax
test esi, esi
jbe 0x42f72b
xor ecx, ecx
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0046083a
mov edi, eax
add esp, 4
lea eax, [esi + esi]
push eax
push 0
push edi
mov dword [ebp - 0x40], edi
call fcn.00482db0
add esp, 0xc
push esi
push edi
push 0x4ad8f4
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
je 0x42f72b
push edi
lea ecx, [ebp - 0x48]
call fcn.00403c10
mov byte [ebp - 4], 9
call fcn.00468b49
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x42f60a
push 0x80004005
call fcn.00401210
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x18], eax
lea ecx, [ebp - 0x4c]
push ecx
push 0x4ad8f0
lea edx, [ebp - 0x5c]
push edx
lea ecx, [ebp - 0x48]
mov byte [ebp - 4], 0xa
call fcn.00407f90
push eax
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 0xb
call fcn.00401a50
mov eax, dword [ebp - 0x5c]
add eax, 0xfffffff0
mov byte [ebp - 4], 0xa
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x42f662
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [ebp - 0x18]
push 0x4a85ea
push ecx
call fcn.00406e70
add esp, 8
test al, al
je 0x42f6e5
push 0x22
lea ecx, [ebp - 0x18]
mov dword [ebp - 0x30], 1
call fcn.004038f0
lea ecx, [ebp - 0x18]
call fcn.00401ce0
mov ecx, eax
call fcn.00401810
mov edx, dword [ebp - 0x18]
push 1
push edx
lea eax, [ebp - 0x50]
push eax
call fcn.00443f20
add esp, 0xc
mov eax, dword [eax]
push ebx
push eax
lea ecx, [ebp - 0x1c]
push str._s_s
push ecx
mov byte [ebp - 4], 0xc
call fcn.00404580
mov eax, dword [ebp - 0x50]
add eax, 0xfffffff0
add esp, 0x10
mov byte [ebp - 4], 0xa
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x42f6e5
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x18]
add eax, 0xfffffff0
mov byte [ebp - 4], 9
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x42f708
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x48]
add eax, 0xfffffff0
mov byte [ebp - 4], 8
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x42f72b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 4], 4
test edi, edi
je 0x42f73f
push edi
call fcn.0046082f
add esp, 4
cmp dword [ebp - 0x30], 0
je 0x42f7ac
mov edi, dword [ebp - 0x44]
xor esi, esi
lea ebx, [ebx]
mov ecx, dword [esi + 0x4d4b38]
mov edx, dword [ebp - 0x1c]
push ecx
push edx
lea eax, [ebp - 0x2c]
push str._s_s
push eax
call fcn.00404580
mov ecx, dword [ebp - 0x2c]
push ecx
call edi
add esp, 0x14
test eax, eax
jne 0x42f7a3
add esi, 4
cmp esi, 0xc
jb 0x42f750
cmp dword [ebp - 0x34], eax
jne 0x42f7b2
inc dword [ebp - 0x38]
mov eax, dword [ebp - 0x38]
jmp 0x42f470
mov dword [ebp - 0x34], 1
jmp 0x42f7b2
cmp dword [ebp - 0x34], 0
je 0x42f7dd
mov eax, dword [ebp - 0x2c]
add eax, 0xfffffff0
mov byte [ebp - 4], 3
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x42f7d5
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x1c]
jmp 0x42f90d
mov eax, dword [ebp - 0x2c]
add eax, 0xfffffff0
mov byte [ebp - 4], 3
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x42f800
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x1c]
add eax, 0xfffffff0
mov byte [ebp - 4], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x42f823
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
inc dword [ebp - 0x20]
mov edi, dword [ebp - 0x20]
jmp 0x42f3c0
call fcn.00468b49
xor ecx, ecx
cmp eax, edi
setne cl
cmp ecx, edi
jne 0x42f848
push 0x80004005
call fcn.00401210
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
push eax
mov byte [ebp - 4], 0xe
call fcn.00401640
lea ebx, [eax + 0x10]
add esp, 4
mov dword [ebp - 0x20], ebx
mov ecx, dword [ebp - 0x24]
push ecx
mov byte [ebp - 4], 0xf
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea edi, [eax - 1]
test edi, edi
jl 0x42f8ea
xor esi, esi
mov edx, dword [esi + 0x4d4b38]
push edx
push ebx
lea eax, [ebp - 0x18]
push str._s_s
push eax
call fcn.00404580
mov ecx, dword [ebp - 0x18]
push ecx
call dword [ebp - 0x44]
add esp, 0x14
test eax, eax
jne 0x42f9ec
add esi, 4
cmp esi, 0xc
jb 0x42f887
test edi, edi
jl 0x42f8ea
jmp 0x42f8c0
mov edx, dword [ebp - 0x24]
movzx eax, word [edx + edi*2]
cmp ax, 0x2f
je 0x42fa82
cmp ax, 0x5c
je 0x42fa82
cmp ax, 0x20
je 0x42f99e
sub edi, 1
jns 0x42f8c0
add ebx, 0xfffffff0
mov byte [ebp - 4], 0xe
lea ecx, [ebx + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x42f90a
mov ecx, dword [ebx]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push ebx
call edx
mov eax, dword [ebp - 0x18]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
mov byte [ebp - 4], 1
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x42f92d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x28]
add eax, 0xfffffff0
mov byte [ebp - 4], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x42f950
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x42f976
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x34]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x208]
xor ecx, ebp
call fcn.00482b5f
add ebp, 0x20c
mov esp, ebp
pop ebp
ret
push edi
lea eax, [ebp - 0x3c]
push eax
lea ecx, [ebp - 0x14]
call fcn.0040ef40
push eax
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 0x10
call fcn.00401a50
mov eax, dword [ebp - 0x3c]
add eax, 0xfffffff0
mov byte [ebp - 4], 0xf
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x42f9db
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
sub edi, 1
mov ebx, dword [ebp - 0x20]
jns 0x42f885
jmp 0x42f8ea
add ebx, 0xfffffff0
mov byte [ebp - 4], 0xe
lea ecx, [ebx + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x42fa0c
mov ecx, dword [ebx]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push ebx
call edx
mov eax, dword [ebp - 0x18]
add eax, 0xfffffff0
mov byte [ebp - 4], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x42fa2f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x28]
add eax, 0xfffffff0
mov byte [ebp - 4], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x42fa52
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x42fa78
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 1
jmp 0x42f979
add ebx, 0xfffffff0
mov byte [ebp - 4], 0xe
lea ecx, [ebx + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x42faa2
mov ecx, dword [ebx]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push ebx
call edx
mov eax, dword [ebp - 0x18]
add eax, 0xfffffff0
mov byte [ebp - 4], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x42fac5
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x28]
add eax, 0xfffffff0
mov byte [ebp - 4], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x42fae8
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x42fb0e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
jmp 0x42f979