Function at 0x510b60
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5c6cc7
mov eax, dword fs:[0]
push eax
sub esp, 0x54
push ebx
push esi
push edi
mov eax, dword [0x72cec4]
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, 0x730498
mov dword [ebp - 4], 0
call fcn.0050e5c0
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 0x510c72
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 0x510c69
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x510c69
xor ecx, ecx
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00596a3c
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 0x510c60
push 0xffffffffffffffff
lea eax, [ebp - 0x60]
push edi
push eax
call fcn.004b6680
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.005971d5
add esp, 4
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or esi, 0xffffffff
cmp dword [ebp - 0x1c], 0
je 0x510c8f
lea eax, [ebp - 0x24]
push eax
call fcn.004b1220
add esp, 4
test al, al
jne 0x5110e5
lea eax, [ebp - 0x48]
push str.USERPROFILE
push eax
call fcn.004c7470
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.00466290
mov edi, 0x5e4db8
test al, al
je 0x510cc0
xor ecx, ecx
jmp 0x510cca
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.004938c0
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 0x510d21
mov eax, esi
lock xadd dword [edx], eax
cmp eax, 1
setne al
test al, al
jne 0x510d21
push 4
push 2
push dword [ebp - 0x30]
call fcn.00461780
add esp, 0xc
mov ecx, dword [ebp - 0x48]
mov byte [ebp - 4], 0
test ecx, ecx
je 0x510d4b
mov eax, esi
lock xadd dword [ecx], eax
cmp eax, 1
setne al
test al, al
jne 0x510d4b
push 4
push 1
push dword [ebp - 0x48]
call fcn.00461780
add esp, 0xc
cmp dword [ebp - 0x1c], 0
je 0x510d65
lea eax, [ebp - 0x24]
push eax
call fcn.004b1220
add esp, 4
test al, al
jne 0x5110e5
lea eax, [ebp - 0x60]
push str.HOMEPATH
push eax
call fcn.004c7470
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.00466290
test al, al
je 0x510d91
xor ecx, ecx
jmp 0x510d9b
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.004938c0
lea eax, [ebp - 0x54]
mov byte [ebp - 4], 3
push str.HOMEDRIVE
push eax
call fcn.004c7470
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.00466290
test al, al
je 0x510dd8
xor ecx, ecx
jmp 0x510de2
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.004938c0
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 0x510e16
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.004901d0
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 0x510e70
mov eax, esi
lock xadd dword [edx], eax
cmp eax, 1
setne al
test al, al
jne 0x510e70
push 4
push 2
push dword [ebp - 0x30]
call fcn.00461780
add esp, 0xc
mov ecx, dword [ebp - 0x3c]
test ecx, ecx
je 0x510e96
mov eax, esi
lock xadd dword [ecx], eax
cmp eax, 1
setne al
test al, al
jne 0x510e96
push 4
push 2
push dword [ebp - 0x3c]
call fcn.00461780
add esp, 0xc
mov ecx, dword [ebp - 0x54]
test ecx, ecx
je 0x510ebc
mov eax, esi
lock xadd dword [ecx], eax
cmp eax, 1
setne al
test al, al
jne 0x510ebc
push 4
push 1
push dword [ebp - 0x54]
call fcn.00461780
add esp, 0xc
mov ecx, dword [ebp - 0x48]
test ecx, ecx
je 0x510ee2
mov eax, esi
lock xadd dword [ecx], eax
cmp eax, 1
setne al
test al, al
jne 0x510ee2
push 4
push 2
push dword [ebp - 0x48]
call fcn.00461780
add esp, 0xc
mov ecx, dword [ebp - 0x60]
mov byte [ebp - 4], 0
test ecx, ecx
je 0x510f0c
mov eax, esi
lock xadd dword [ecx], eax
cmp eax, 1
setne al
test al, al
jne 0x510f0c
push 4
push 1
push dword [ebp - 0x60]
call fcn.00461780
add esp, 0xc
cmp dword [ebp - 0x1c], 0
je 0x510f26
lea eax, [ebp - 0x24]
push eax
call fcn.004b1220
add esp, 4
test al, al
jne 0x5110e5
lea eax, [ebp - 0x60]
push str.HOME
push eax
call fcn.004c7470
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.00466290
test al, al
je 0x510f52
xor ecx, ecx
jmp 0x510f5c
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.004938c0
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 0x510fba
mov eax, esi
lock xadd dword [edx], eax
cmp eax, 1
setne al
test al, al
jne 0x510fba
push 4
push 2
push dword [ebp - 0x30]
call fcn.00461780
add esp, 0xc
mov ecx, dword [ebp - 0x60]
mov byte [ebp - 4], 0
test ecx, ecx
je 0x510fe4
mov eax, esi
lock xadd dword [ecx], eax
cmp eax, 1
setne al
test al, al
jne 0x510fe4
push 4
push 1
push dword [ebp - 0x60]
call fcn.00461780
add esp, 0xc
cmp dword [ebp - 0x1c], 0
je 0x510ffe
lea eax, [ebp - 0x24]
push eax
call fcn.004b1220
add esp, 4
test al, al
jne 0x5110e5
lea eax, [ebp - 0x60]
mov byte [ebp - 4], 8
push str.SystemDrive
push eax
call fcn.004c7470
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.00466290
test al, al
je 0x51102e
xor edi, edi
jmp 0x511036
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.00493810
mov ecx, dword [ebp - 0x60]
add esp, 0xc
mov dword [ebp - 0x18], 0xee
mov byte [ebp - 4], 8
test ecx, ecx
je 0x511077
mov eax, esi
lock xadd dword [ecx], eax
cmp eax, 1
setne al
test al, al
jne 0x511077
push 4
push 1
push dword [ebp - 0x60]
call fcn.00461780
add esp, 0xc
cmp dword [ebp - 0x28], 0
jne 0x51108c
push 0x669290
push 2
lea ecx, [ebp - 0x30]
call fcn.0048f5f0
push ecx
mov eax, esp
mov ecx, 0x2f
mov word [eax], cx
lea ecx, [ebp - 0x30]
call fcn.00490310
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 0x5110e5
mov eax, esi
lock xadd dword [edx], eax
cmp eax, 1
jne 0x5110e5
push 4
push 2
push dword [ebp - 0x30]
call fcn.00461780
add esp, 0xc
mov edi, dword [ebp + 8]
lea eax, [ebp - 0x24]
push eax
push edi
call fcn.004e5410
mov eax, dword [ebp - 0x24]
add esp, 8
test eax, eax
je 0x511114
lock xadd dword [eax], esi
cmp esi, 1
jne 0x511114
push 4
push 2
push dword [ebp - 0x24]
call fcn.00461780
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