Function at 0x4e1ca0
Capabilities:
Get common file path

Disassembly:
sub esp, 0x228
lea ecx, [esp + 0x230]
push ebx
push ebp
push esi
push edi
push 0
push 1
call fcn.00413520
test eax, eax
je 0x4e1eb4
mov eax, dword [0x554e0c]
mov ecx, 0x81
mov dword [esp + 0x30], eax
xor eax, eax
lea edi, [esp + 0x34]
push 0x104
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x34]
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
mov edx, str._sysdir_
test edx, edx
je 0x4e1eb4
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ebx, eax
test ebx, ebx
je 0x4e1eb4
lea eax, [esp + 0x30]
test eax, eax
jne 0x4e1d14
mov dword [esp + 0x14], eax
jmp 0x4e1d23
lea ecx, [esp + 0x30]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov dword [esp + 0x14], eax
mov esi, dword [esp + 0x240]
xor edi, edi
mov edx, dword [esi - 8]
lea ebp, [esi + edx*2]
cmp esi, ebp
jae 0x4e1eb4
push str._sysdir_
push esi
call fcn.0053225f
add esp, 8
test eax, eax
je 0x4e1d62
lea esi, [eax + ebx*2]
push str._sysdir_
push esi
inc edi
call fcn.0053225f
add esp, 8
test eax, eax
jne 0x4e1d4c
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea esi, [esi + eax*2 + 2]
cmp esi, ebp
jb 0x4e1d3a
test edi, edi
jle 0x4e1eb4
lea ecx, [esp + 0x240]
call fcn.004055c0
mov ebp, dword [esp + 0x14]
mov esi, dword [esp + 0x240]
sub ebp, ebx
imul ebp, edi
mov eax, dword [esi - 8]
mov dword [esp + 0x18], eax
add ebp, eax
mov eax, dword [esi - 4]
mov dword [esp + 0x28], ebp
cmp eax, ebp
jl 0x4e1daf
cmp dword [esi - 0xc], 1
jle 0x4e1df6
lea eax, [esi - 0xc]
push ebp
lea ecx, [esp + 0x244]
mov dword [esp + 0x14], eax
call fcn.00405530
test eax, eax
je 0x4e1eb4
mov eax, dword [esp + 0x10]
mov edi, dword [esp + 0x240]
push eax
mov ecx, dword [eax + 4]
shl ecx, 1
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call fcn.00405590
mov esi, dword [esp + 0x240]
mov eax, dword [esi - 8]
lea eax, [esi + eax*2]
cmp esi, eax
mov dword [esp + 0x1c], eax
jae 0x4e1eb1
push str._sysdir_
push esi
call fcn.0053225f
mov edi, eax
add esp, 8
test edi, edi
je 0x4e1e93
mov eax, dword [esp + 0x240]
mov edx, dword [esp + 0x14]
mov ecx, edi
sub ecx, eax
mov eax, dword [esp + 0x18]
sar ecx, 1
sub eax, ecx
lea esi, [edx + edx]
sub eax, ebx
ret
lea ecx, [edi + ebx*2]
lea ebp, [eax + eax]
lea eax, [esi + edi]
push ebp
push ecx
push eax
mov dword [esp + 0x1c], eax
call fcn.00532360
mov ecx, esi
lea esi, [esp + 0x3c]
mov edx, ecx
mov eax, dword [esp + 0x20]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
sub eax, ebx
and ecx, 3
push str._sysdir_
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x20]
push esi
mov word [esi + ebp], 0
mov ebp, dword [esp + 0x2c]
add ebp, eax
mov dword [esp + 0x2c], ebp
call fcn.0053225f
mov edi, eax
add esp, 0x14
test edi, edi
jne 0x4e1e1c
mov ebp, dword [esp + 0x28]
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea esi, [esi + eax*2 + 2]
mov eax, dword [esp + 0x1c]
cmp esi, eax
jb 0x4e1e08
mov esi, dword [esp + 0x240]
mov dword [esi - 8], ebp
push 0
push str._windir_
lea ecx, [esp + 0x248]
call fcn.00405c70
test eax, eax
jl 0x4e20c2
mov ecx, dword [0x554e0c]
xor eax, eax
mov dword [esp + 0x30], ecx
mov ecx, 0x81
lea edi, [esp + 0x34]
lea edx, [esp + 0x30]
push 0x104
push edx
rep stosd dword es:[edi], eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
mov eax, str._windir_
test eax, eax
je 0x4e20c2
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ebx, eax
test ebx, ebx
je 0x4e20c2
lea ecx, [esp + 0x30]
test ecx, ecx
jne 0x4e1f22
mov dword [esp + 0x14], ecx
jmp 0x4e1f31
lea edx, [esp + 0x30]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov dword [esp + 0x14], eax
mov esi, dword [esp + 0x240]
xor edi, edi
mov eax, dword [esi - 8]
lea ebp, [esi + eax*2]
cmp esi, ebp
jae 0x4e20c2
push str._windir_
push esi
call fcn.0053225f
add esp, 8
test eax, eax
je 0x4e1f70
lea esi, [eax + ebx*2]
push str._windir_
push esi
inc edi
call fcn.0053225f
add esp, 8
test eax, eax
jne 0x4e1f5a
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea esi, [esi + eax*2 + 2]
cmp esi, ebp
jb 0x4e1f48
test edi, edi
jle 0x4e20c2
lea ecx, [esp + 0x240]
call fcn.004055c0
mov ebp, dword [esp + 0x14]
mov esi, dword [esp + 0x240]
sub ebp, ebx
imul ebp, edi
mov eax, dword [esi - 8]
mov dword [esp + 0x18], eax
add ebp, eax
mov eax, dword [esi - 4]
mov dword [esp + 0x28], ebp
cmp eax, ebp
jl 0x4e1fbd
cmp dword [esi - 0xc], 1
jle 0x4e2004
lea ecx, [esi - 0xc]
push ebp
mov dword [esp + 0x20], ecx
lea ecx, [esp + 0x244]
call fcn.00405530
test eax, eax
je 0x4e20c2
mov eax, dword [esp + 0x1c]
mov edi, dword [esp + 0x240]
push eax
mov ecx, dword [eax + 4]
shl ecx, 1
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call fcn.00405590
mov esi, dword [esp + 0x240]
mov eax, dword [esi - 8]
lea eax, [esi + eax*2]
cmp esi, eax
mov dword [esp + 0x10], eax
jae 0x4e20bf
push str._windir_
push esi
call fcn.0053225f
mov edi, eax
add esp, 8
test edi, edi
je 0x4e20a1
mov eax, dword [esp + 0x240]
mov edx, dword [esp + 0x14]
mov ecx, edi
sub ecx, eax
mov eax, dword [esp + 0x18]
sar ecx, 1
sub eax, ecx
lea esi, [edx + edx]
sub eax, ebx
lea ecx, [edi + ebx*2]
lea ebp, [eax + eax]
lea eax, [esi + edi]
push ebp
push ecx
push eax
mov dword [esp + 0x28], eax
call fcn.00532360
mov ecx, esi
lea esi, [esp + 0x3c]
mov edx, ecx
mov eax, dword [esp + 0x20]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
sub eax, ebx
and ecx, 3
push str._windir_
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x2c]
push esi
mov word [esi + ebp], 0
mov ebp, dword [esp + 0x2c]
add ebp, eax
mov dword [esp + 0x2c], ebp
call fcn.0053225f
mov edi, eax
add esp, 0x14
test edi, edi
jne 0x4e202a
mov ebp, dword [esp + 0x28]
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea esi, [esi + eax*2 + 2]
mov eax, dword [esp + 0x10]
cmp esi, eax
jb 0x4e2016
mov esi, dword [esp + 0x240]
mov dword [esi - 8], ebp
push 0
push 1
lea ecx, [esp + 0x248]
call fcn.00413520
test eax, eax
je 0x4e22e2
lea ecx, [esp + 0x10]
push 0
push ecx
call fcn.004b7b90
mov esi, dword [eax]
mov edx, str._drive_
add esp, 8
mov dword [esp + 0x28], esi
test edx, edx
je 0x4e22b3
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ebx, eax
test ebx, ebx
je 0x4e22b3
xor edi, edi
cmp esi, edi
jne 0x4e2119
mov dword [esp + 0x14], edi
jmp 0x4e2124
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov dword [esp + 0x14], eax
mov esi, dword [esp + 0x240]
mov eax, dword [esi - 8]
lea ebp, [esi + eax*2]
cmp esi, ebp
jae 0x4e22b3
push str._drive_
push esi
call fcn.0053225f
add esp, 8
test eax, eax
je 0x4e2161
lea esi, [eax + ebx*2]
push str._drive_
push esi
inc edi
call fcn.0053225f
add esp, 8
test eax, eax
jne 0x4e214b
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea esi, [esi + eax*2 + 2]
cmp esi, ebp
jb 0x4e2139
test edi, edi
jle 0x4e22b3
lea ecx, [esp + 0x240]
call fcn.004055c0
mov ebp, dword [esp + 0x14]
mov esi, dword [esp + 0x240]
sub ebp, ebx
imul ebp, edi
mov eax, dword [esi - 8]
mov dword [esp + 0x18], eax
add ebp, eax
mov eax, dword [esi - 4]
mov dword [esp + 0x2c], ebp
cmp eax, ebp
jl 0x4e21ae
cmp dword [esi - 0xc], 1
jle 0x4e21f5
lea ecx, [esi - 0xc]
push ebp
mov dword [esp + 0x20], ecx
lea ecx, [esp + 0x244]
call fcn.00405530
test eax, eax
je 0x4e22b3
mov eax, dword [esp + 0x1c]
mov edi, dword [esp + 0x240]
push eax
mov ecx, dword [eax + 4]
shl ecx, 1
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call fcn.00405590
mov esi, dword [esp + 0x240]
mov eax, dword [esi - 8]
lea eax, [esi + eax*2]
cmp esi, eax
mov dword [esp + 0x20], eax
jae 0x4e22b0
push str._drive_
push esi
call fcn.0053225f
mov edi, eax
add esp, 8
test edi, edi
je 0x4e2292
mov eax, dword [esp + 0x240]
mov edx, dword [esp + 0x14]
mov ecx, edi
sub ecx, eax
mov eax, dword [esp + 0x18]
sar ecx, 1
sub eax, ecx
lea esi, [edx + edx]
sub eax, ebx
lea ecx, [edi + ebx*2]
lea ebp, [eax + eax]
lea eax, [esi + edi]
push ebp
push ecx
push eax
mov dword [esp + 0x28], eax
call fcn.00532360
mov ecx, esi
mov esi, dword [esp + 0x34]
mov edx, ecx
mov eax, dword [esp + 0x20]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
sub eax, ebx
and ecx, 3
push str._drive_
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x2c]
push esi
mov word [esi + ebp], 0
mov ebp, dword [esp + 0x2c]
add ebp, eax
mov dword [esp + 0x2c], ebp
call fcn.0053225f
mov edi, eax
add esp, 0x14
test edi, edi
jne 0x4e221b
mov ebp, dword [esp + 0x2c]
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea esi, [esi + eax*2 + 2]
mov eax, dword [esp + 0x20]
cmp esi, eax
jb 0x4e2207
mov esi, dword [esp + 0x240]
mov dword [esi - 8], ebp
mov eax, dword [esp + 0x10]
mov edx, dword [0x547574]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x4e22e2
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x4e22e2
mov edx, dword [esp + 0x10]
add edx, 0xfffffff4
push edx
call fcn.00532222
add esp, 4
push 0
push 1
lea ecx, [esp + 0x248]
call fcn.00413520
test eax, eax
je 0x4e234a
lea eax, [esp + 0x10]
push eax
call fcn.004b7e30
mov eax, dword [eax]
add esp, 4
lea ecx, [esp + 0x240]
push eax
push str._drive_
call fcn.00413840
mov eax, dword [esp + 0x10]
mov edx, dword [0x547574]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x4e234a
mov esi, dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
add eax, 0xfffffff4
push eax
call esi
test eax, eax
jg 0x4e2350
mov edx, dword [esp + 0x10]
add edx, 0xfffffff4
push edx
call fcn.00532222
add esp, 4
jmp 0x4e2350
mov esi, dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
push 0
push 1
lea ecx, [esp + 0x248]
call fcn.00413520
test eax, eax
je 0x4e23d0
lea ecx, [esp + 0x20]
call fcn.005107a0
push 0
push 0
lea ecx, [esp + 0x28]
call fcn.00511580
lea eax, [esp + 0x10]
lea ecx, [esp + 0x20]
push eax
call fcn.00511000
mov eax, dword [eax]
lea ecx, [esp + 0x240]
push eax
push str._desktop_
call fcn.00413840
mov eax, dword [esp + 0x10]
mov edx, dword [0x547574]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x4e23c7
add eax, 0xfffffff4
push eax
call esi
test eax, eax
jg 0x4e23c7
mov edx, dword [esp + 0x10]
add edx, 0xfffffff4
push edx
call fcn.00532222
add esp, 4
lea ecx, [esp + 0x20]
call fcn.00510740
push 0
push 1
lea ecx, [esp + 0x248]
call fcn.00413520
test eax, eax
je 0x4e2450
lea ecx, [esp + 0x20]
call fcn.005107a0
push 0
push 0x1a
lea ecx, [esp + 0x28]
call fcn.00511580
lea eax, [esp + 0x10]
lea ecx, [esp + 0x20]
push eax
call fcn.00511000
mov eax, dword [eax]
lea ecx, [esp + 0x240]
push eax
push str._appdata_
call fcn.00413840
mov eax, dword [esp + 0x10]
mov edx, dword [0x547574]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x4e2447
add eax, 0xfffffff4
push eax
call esi
test eax, eax
jg 0x4e2447
mov edx, dword [esp + 0x10]
add edx, 0xfffffff4
push edx
call fcn.00532222
add esp, 4
lea ecx, [esp + 0x20]
call fcn.00510740
push 0
push 1
lea ecx, [esp + 0x248]
call fcn.00413520
test eax, eax
je 0x4e24d0
lea ecx, [esp + 0x20]
call fcn.005107a0
push 0
push 5
lea ecx, [esp + 0x28]
call fcn.00511580
lea eax, [esp + 0x10]
lea ecx, [esp + 0x20]
push eax
call fcn.00511000
mov eax, dword [eax]
lea ecx, [esp + 0x240]
push eax
push str._personal_
call fcn.00413840
mov eax, dword [esp + 0x10]
mov edx, dword [0x547574]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x4e24c7
add eax, 0xfffffff4
push eax
call esi
test eax, eax
jg 0x4e24c7
mov edx, dword [esp + 0x10]
add edx, 0xfffffff4
push edx
call fcn.00532222
add esp, 4
lea ecx, [esp + 0x20]
call fcn.00510740
mov esi, dword [esp + 0x244]
test esi, esi
je 0x4e2532
push 0
push 0x54fc34
lea ecx, [esp + 0x248]
call fcn.00405c70
test eax, eax
jl 0x4e2532
lea eax, [esp + 0x10]
lea ecx, [esp + 0x20]
push eax
push ecx
mov ecx, esi
call fcn.004db5c0
mov ecx, eax
call fcn.00511000
lea ecx, [esp + 0x20]
call fcn.00510740
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x240]
push edx
push 0x54fc34
call fcn.00413840
lea ecx, [esp + 0x10]
call fcn.00405700
xor esi, esi
mov eax, dword [0x547570]
lea edi, [esi + 1]
push 0x54fc30
push edi
push 0x54fc30
lea ecx, [esp + 0x20]
push str._scurdir_d_s
push ecx
mov dword [esp + 0x28], eax
call fcn.00405cb0
mov edx, dword [esp + 0x28]
add esp, 0x14
lea ecx, [esp + 0x240]
push 0
push edx
call fcn.00405c70
test eax, eax
jl 0x4e25c1
push esi
call fcn.00478d40
add esp, 4
test eax, eax
je 0x4e25c1
lea ecx, [esp + 0x10]
lea edx, [esp + 0x20]
push ecx
push edx
mov ecx, eax
call fcn.004db5c0
mov ecx, eax
call fcn.00511000
lea ecx, [esp + 0x20]
call fcn.00510740
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
push eax
push ecx
lea ecx, [esp + 0x248]
call fcn.00413840
lea ecx, [esp + 0x10]
call fcn.00405700
lea ecx, [esp + 0x14]
call fcn.00405700
mov esi, edi
cmp esi, 4
jl 0x4e2534
mov esi, dword [esp + 0x23c]
lea edx, [esp + 0x240]
push edx
mov ecx, esi
call fcn.00405440
lea ecx, [esp + 0x240]
call fcn.00405700
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x228
ret