Function at 0x508b80
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5beca7
mov eax, dword fs:[0]
push eax
sub esp, 0x54
push ebx
push esi
push edi
mov eax, dword [0x71c56c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0
mov ecx, 0x71fb58
mov dword [ebp - 4], 0
call fcn.005065e0
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea ecx, [ebp - 0x10]
mov dword [ebp - 0x10], 0
push ecx
push 8
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x508c92
lea eax, [ebp - 0x14]
mov dword [ebp - 0x14], 0
push eax
push 0
push dword [ebp - 0x10]
call dword [sym.imp.USERENV.dll_GetUserProfileDirectoryW]
test eax, eax
jne 0x508c89
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x508c89
xor ecx, ecx
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0058ea3c
add esp, 4
mov edi, eax
lea eax, [ebp - 0x14]
push eax
push edi
push dword [ebp - 0x10]
call dword [sym.imp.USERENV.dll_GetUserProfileDirectoryW]
test eax, eax
je 0x508c80
push 0xffffffffffffffff
lea eax, [ebp - 0x60]
push edi
push eax
call fcn.004ae6d0
mov edx, dword [ebp - 0x24]
mov esi, eax
add esp, 0xc
mov ecx, dword [esi]
mov dword [ebp - 0x24], ecx
mov ecx, dword [esi + 4]
mov dword [esi], edx
mov edx, dword [ebp - 0x20]
mov dword [ebp - 0x20], ecx
mov eax, dword [esi + 8]
mov dword [esi + 4], edx
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0x1c], eax
mov dword [esi + 8], ecx
lea ecx, [ebp - 0x60]
call fcn.004019e0
push edi
call fcn.0058f1d5
add esp, 4
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or esi, 0xffffffff
cmp dword [ebp - 0x1c], 0
je 0x508caf
lea eax, [ebp - 0x24]
push eax
call fcn.004a9270
add esp, 4
test al, al
jne 0x509105
lea eax, [ebp - 0x48]
push str.USERPROFILE
push eax
call fcn.004bf4a0
add esp, 8
mov ebx, eax
mov eax, dword [ebx + 8]
mov ecx, ebx
mov byte [ebp - 4], 1
mov dword [ebp - 0x14], eax
call fcn.0045e2f0
mov edi, 0x5cebe4
test al, al
je 0x508ce0
xor ecx, ecx
jmp 0x508cea
mov eax, dword [ebx + 4]
mov ecx, edi
test eax, eax
cmovne ecx, eax
push ecx
push dword [ebp - 0x14]
lea eax, [ebp - 0x30]
push eax
call fcn.0048b910
mov edx, dword [ebp - 0x24]
add esp, 0xc
mov eax, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x20]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x2c], ecx
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0x30], edx
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x28], ecx
test edx, edx
je 0x508d41
mov eax, esi
lock xadd dword [edx], eax
cmp eax, 1
setne al
test al, al
jne 0x508d41
push 4
push 2
push dword [ebp - 0x30]
call fcn.004597e0
add esp, 0xc
mov ecx, dword [ebp - 0x48]
mov byte [ebp - 4], 0
test ecx, ecx
je 0x508d6b
mov eax, esi
lock xadd dword [ecx], eax
cmp eax, 1
setne al
test al, al
jne 0x508d6b
push 4
push 1
push dword [ebp - 0x48]
call fcn.004597e0
add esp, 0xc
cmp dword [ebp - 0x1c], 0
je 0x508d85
lea eax, [ebp - 0x24]
push eax
call fcn.004a9270
add esp, 4
test al, al
jne 0x509105
lea eax, [ebp - 0x60]
push str.HOMEPATH
push eax
call fcn.004bf4a0
add esp, 8
mov ebx, eax
mov eax, dword [ebx + 8]
mov ecx, ebx
mov byte [ebp - 4], 2
mov dword [ebp - 0x14], eax
call fcn.0045e2f0
test al, al
je 0x508db1
xor ecx, ecx
jmp 0x508dbb
mov eax, dword [ebx + 4]
mov ecx, edi
test eax, eax
cmovne ecx, eax
push ecx
push dword [ebp - 0x14]
lea eax, [ebp - 0x48]
push eax
call fcn.0048b910
lea eax, [ebp - 0x54]
mov byte [ebp - 4], 3
push str.HOMEDRIVE
push eax
call fcn.004bf4a0
add esp, 0x14
mov ebx, eax
mov eax, dword [ebx + 8]
mov ecx, ebx
mov byte [ebp - 4], 4
mov dword [ebp - 0x14], eax
call fcn.0045e2f0
test al, al
je 0x508df8
xor ecx, ecx
jmp 0x508e02
mov eax, dword [ebx + 4]
mov ecx, edi
test eax, eax
cmovne ecx, eax
push ecx
push dword [ebp - 0x14]
lea eax, [ebp - 0x3c]
push eax
call fcn.0048b910
add esp, 0xc
movq xmm0, qword [ebp - 0x3c]
mov ecx, dword [ebp - 0x3c]
mov eax, dword [ebp - 0x34]
mov byte [ebp - 4], 6
movq qword [ebp - 0x30], xmm0
mov dword [ebp - 0x28], eax
test ecx, ecx
je 0x508e36
mov eax, 1
lock xadd dword [ecx], eax
lea eax, [ebp - 0x48]
mov dword [ebp - 0x18], 0x1e
push eax
lea ecx, [ebp - 0x30]
call fcn.00488220
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x20]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x2c], ecx
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0x30], edx
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x28], ecx
test edx, edx
je 0x508e90
mov eax, esi
lock xadd dword [edx], eax
cmp eax, 1
setne al
test al, al
jne 0x508e90
push 4
push 2
push dword [ebp - 0x30]
call fcn.004597e0
add esp, 0xc
mov ecx, dword [ebp - 0x3c]
test ecx, ecx
je 0x508eb6
mov eax, esi
lock xadd dword [ecx], eax
cmp eax, 1
setne al
test al, al
jne 0x508eb6
push 4
push 2
push dword [ebp - 0x3c]
call fcn.004597e0
add esp, 0xc
mov ecx, dword [ebp - 0x54]
test ecx, ecx
je 0x508edc
mov eax, esi
lock xadd dword [ecx], eax
cmp eax, 1
setne al
test al, al
jne 0x508edc
push 4
push 1
push dword [ebp - 0x54]
call fcn.004597e0
add esp, 0xc
mov ecx, dword [ebp - 0x48]
test ecx, ecx
je 0x508f02
mov eax, esi
lock xadd dword [ecx], eax
cmp eax, 1
setne al
test al, al
jne 0x508f02
push 4
push 2
push dword [ebp - 0x48]
call fcn.004597e0
add esp, 0xc
mov ecx, dword [ebp - 0x60]
mov byte [ebp - 4], 0
test ecx, ecx
je 0x508f2c
mov eax, esi
lock xadd dword [ecx], eax
cmp eax, 1
setne al
test al, al
jne 0x508f2c
push 4
push 1
push dword [ebp - 0x60]
call fcn.004597e0
add esp, 0xc
cmp dword [ebp - 0x1c], 0
je 0x508f46
lea eax, [ebp - 0x24]
push eax
call fcn.004a9270
add esp, 4
test al, al
jne 0x509105
lea eax, [ebp - 0x60]
push str.HOME
push eax
call fcn.004bf4a0
add esp, 8
mov ebx, eax
mov eax, dword [ebx + 8]
mov ecx, ebx
mov byte [ebp - 4], 7
mov dword [ebp - 0x14], eax
call fcn.0045e2f0
test al, al
je 0x508f72
xor ecx, ecx
jmp 0x508f7c
mov eax, dword [ebx + 4]
mov ecx, edi
test eax, eax
cmovne ecx, eax
push ecx
push dword [ebp - 0x14]
lea eax, [ebp - 0x30]
push eax
call fcn.0048b910
mov edx, dword [ebp - 0x24]
add esp, 0xc
mov eax, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x20]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x2c], ecx
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0x18], 0x2e
mov dword [ebp - 0x30], edx
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x28], ecx
test edx, edx
je 0x508fda
mov eax, esi
lock xadd dword [edx], eax
cmp eax, 1
setne al
test al, al
jne 0x508fda
push 4
push 2
push dword [ebp - 0x30]
call fcn.004597e0
add esp, 0xc
mov ecx, dword [ebp - 0x60]
mov byte [ebp - 4], 0
test ecx, ecx
je 0x509004
mov eax, esi
lock xadd dword [ecx], eax
cmp eax, 1
setne al
test al, al
jne 0x509004
push 4
push 1
push dword [ebp - 0x60]
call fcn.004597e0
add esp, 0xc
cmp dword [ebp - 0x1c], 0
je 0x50901e
lea eax, [ebp - 0x24]
push eax
call fcn.004a9270
add esp, 4
test al, al
jne 0x509105
lea eax, [ebp - 0x60]
mov byte [ebp - 4], 8
push str.SystemDrive
push eax
call fcn.004bf4a0
add esp, 8
mov ebx, eax
mov eax, dword [ebx + 8]
mov ecx, ebx
mov byte [ebp - 4], 9
mov dword [ebp - 0x14], eax
call fcn.0045e2f0
test al, al
je 0x50904e
xor edi, edi
jmp 0x509056
mov eax, dword [ebx + 4]
test eax, eax
cmovne edi, eax
push edi
push dword [ebp - 0x14]
lea eax, [ebp - 0x30]
push eax
call fcn.0048b860
mov ecx, dword [ebp - 0x60]
add esp, 0xc
mov dword [ebp - 0x18], 0xee
mov byte [ebp - 4], 8
test ecx, ecx
je 0x509097
mov eax, esi
lock xadd dword [ecx], eax
cmp eax, 1
setne al
test al, al
jne 0x509097
push 4
push 1
push dword [ebp - 0x60]
call fcn.004597e0
add esp, 0xc
cmp dword [ebp - 0x28], 0
jne 0x5090ac
push 0x6530c0
push 2
lea ecx, [ebp - 0x30]
call fcn.00487640
push ecx
mov eax, esp
mov ecx, 0x2f
mov word [eax], cx
lea ecx, [ebp - 0x30]
call fcn.00488360
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x20]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x2c], ecx
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0x30], edx
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x28], ecx
mov byte [ebp - 4], 0
test edx, edx
je 0x509105
mov eax, esi
lock xadd dword [edx], eax
cmp eax, 1
jne 0x509105
push 4
push 2
push dword [ebp - 0x30]
call fcn.004597e0
add esp, 0xc
mov edi, dword [ebp + 8]
lea eax, [ebp - 0x24]
push eax
push edi
call fcn.004dd440
mov eax, dword [ebp - 0x24]
add esp, 8
test eax, eax
je 0x509134
lock xadd dword [eax], esi
cmp esi, 1
jne 0x509134
push 4
push 2
push dword [ebp - 0x24]
call fcn.004597e0
add esp, 0xc
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret