Function at 0x50f210
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5c5327
mov eax, dword fs:[0]
push eax
sub esp, 0x54
push ebx
push esi
push edi
mov eax, dword [0x72b01c]
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, 0x72e618
mov dword [ebp - 4], 0
call fcn.0050cc70
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 0x50f322
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 0x50f319
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x50f319
xor ecx, ecx
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0059509c
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 0x50f310
push 0xffffffffffffffff
lea eax, [ebp - 0x60]
push edi
push eax
call fcn.004b4d80
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.00595835
add esp, 4
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or esi, 0xffffffff
cmp dword [ebp - 0x1c], 0
je 0x50f33f
lea eax, [ebp - 0x24]
push eax
call fcn.004af920
add esp, 4
test al, al
jne 0x50f795
lea eax, [ebp - 0x48]
push str.USERPROFILE
push eax
call fcn.004c5b50
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.004649a0
mov edi, 0x5e0b28
test al, al
je 0x50f370
xor ecx, ecx
jmp 0x50f37a
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.00491fc0
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 0x50f3d1
mov eax, esi
lock xadd dword [edx], eax
cmp eax, 1
setne al
test al, al
jne 0x50f3d1
push 4
push 2
push dword [ebp - 0x30]
call fcn.0045fe90
add esp, 0xc
mov ecx, dword [ebp - 0x48]
mov byte [ebp - 4], 0
test ecx, ecx
je 0x50f3fb
mov eax, esi
lock xadd dword [ecx], eax
cmp eax, 1
setne al
test al, al
jne 0x50f3fb
push 4
push 1
push dword [ebp - 0x48]
call fcn.0045fe90
add esp, 0xc
cmp dword [ebp - 0x1c], 0
je 0x50f415
lea eax, [ebp - 0x24]
push eax
call fcn.004af920
add esp, 4
test al, al
jne 0x50f795
lea eax, [ebp - 0x60]
push str.HOMEPATH
push eax
call fcn.004c5b50
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.004649a0
test al, al
je 0x50f441
xor ecx, ecx
jmp 0x50f44b
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.00491fc0
lea eax, [ebp - 0x54]
mov byte [ebp - 4], 3
push str.HOMEDRIVE
push eax
call fcn.004c5b50
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.004649a0
test al, al
je 0x50f488
xor ecx, ecx
jmp 0x50f492
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.00491fc0
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 0x50f4c6
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.0048e8d0
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 0x50f520
mov eax, esi
lock xadd dword [edx], eax
cmp eax, 1
setne al
test al, al
jne 0x50f520
push 4
push 2
push dword [ebp - 0x30]
call fcn.0045fe90
add esp, 0xc
mov ecx, dword [ebp - 0x3c]
test ecx, ecx
je 0x50f546
mov eax, esi
lock xadd dword [ecx], eax
cmp eax, 1
setne al
test al, al
jne 0x50f546
push 4
push 2
push dword [ebp - 0x3c]
call fcn.0045fe90
add esp, 0xc
mov ecx, dword [ebp - 0x54]
test ecx, ecx
je 0x50f56c
mov eax, esi
lock xadd dword [ecx], eax
cmp eax, 1
setne al
test al, al
jne 0x50f56c
push 4
push 1
push dword [ebp - 0x54]
call fcn.0045fe90
add esp, 0xc
mov ecx, dword [ebp - 0x48]
test ecx, ecx
je 0x50f592
mov eax, esi
lock xadd dword [ecx], eax
cmp eax, 1
setne al
test al, al
jne 0x50f592
push 4
push 2
push dword [ebp - 0x48]
call fcn.0045fe90
add esp, 0xc
mov ecx, dword [ebp - 0x60]
mov byte [ebp - 4], 0
test ecx, ecx
je 0x50f5bc
mov eax, esi
lock xadd dword [ecx], eax
cmp eax, 1
setne al
test al, al
jne 0x50f5bc
push 4
push 1
push dword [ebp - 0x60]
call fcn.0045fe90
add esp, 0xc
cmp dword [ebp - 0x1c], 0
je 0x50f5d6
lea eax, [ebp - 0x24]
push eax
call fcn.004af920
add esp, 4
test al, al
jne 0x50f795
lea eax, [ebp - 0x60]
push str.HOME
push eax
call fcn.004c5b50
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.004649a0
test al, al
je 0x50f602
xor ecx, ecx
jmp 0x50f60c
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.00491fc0
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 0x50f66a
mov eax, esi
lock xadd dword [edx], eax
cmp eax, 1
setne al
test al, al
jne 0x50f66a
push 4
push 2
push dword [ebp - 0x30]
call fcn.0045fe90
add esp, 0xc
mov ecx, dword [ebp - 0x60]
mov byte [ebp - 4], 0
test ecx, ecx
je 0x50f694
mov eax, esi
lock xadd dword [ecx], eax
cmp eax, 1
setne al
test al, al
jne 0x50f694
push 4
push 1
push dword [ebp - 0x60]
call fcn.0045fe90
add esp, 0xc
cmp dword [ebp - 0x1c], 0
je 0x50f6ae
lea eax, [ebp - 0x24]
push eax
call fcn.004af920
add esp, 4
test al, al
jne 0x50f795
lea eax, [ebp - 0x60]
mov byte [ebp - 4], 8
push str.SystemDrive
push eax
call fcn.004c5b50
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.004649a0
test al, al
je 0x50f6de
xor edi, edi
jmp 0x50f6e6
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.00491f10
mov ecx, dword [ebp - 0x60]
add esp, 0xc
mov dword [ebp - 0x18], 0xee
mov byte [ebp - 4], 8
test ecx, ecx
je 0x50f727
mov eax, esi
lock xadd dword [ecx], eax
cmp eax, 1
setne al
test al, al
jne 0x50f727
push 4
push 1
push dword [ebp - 0x60]
call fcn.0045fe90
add esp, 0xc
cmp dword [ebp - 0x28], 0
jne 0x50f73c
push 0x665000
push 2
lea ecx, [ebp - 0x30]
call fcn.0048dcf0
push ecx
mov eax, esp
mov ecx, 0x2f
mov word [eax], cx
lea ecx, [ebp - 0x30]
call fcn.0048ea10
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 0x50f795
mov eax, esi
lock xadd dword [edx], eax
cmp eax, 1
jne 0x50f795
push 4
push 2
push dword [ebp - 0x30]
call fcn.0045fe90
add esp, 0xc
mov edi, dword [ebp + 8]
lea eax, [ebp - 0x24]
push eax
push edi
call fcn.004e3ae0
mov eax, dword [ebp - 0x24]
add esp, 8
test eax, eax
je 0x50f7c4
lock xadd dword [eax], esi
cmp esi, 1
jne 0x50f7c4
push 4
push 2
push dword [ebp - 0x24]
call fcn.0045fe90
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