Function at 0x4e10e0
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.004136d0
test eax, eax
je 0x4e12f4
mov eax, dword [0x553d9c]
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 0x4e12f4
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ebx, eax
test ebx, ebx
je 0x4e12f4
lea eax, [esp + 0x30]
test eax, eax
jne 0x4e1154
mov dword [esp + 0x14], eax
jmp 0x4e1163
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 0x4e12f4
push str._sysdir_
push esi
call fcn.0053176f
add esp, 8
test eax, eax
je 0x4e11a2
lea esi, [eax + ebx*2]
push str._sysdir_
push esi
inc edi
call fcn.0053176f
add esp, 8
test eax, eax
jne 0x4e118c
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea esi, [esi + eax*2 + 2]
cmp esi, ebp
jb 0x4e117a
test edi, edi
jle 0x4e12f4
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 0x4e11ef
cmp dword [esi - 0xc], 1
jle 0x4e1236
lea eax, [esi - 0xc]
push ebp
lea ecx, [esp + 0x244]
mov dword [esp + 0x14], eax
call fcn.00405530
test eax, eax
je 0x4e12f4
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 0x4e12f1
push str._sysdir_
push esi
call fcn.0053176f
mov edi, eax
add esp, 8
test edi, edi
je 0x4e12d3
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 + 0x1c], eax
call fcn.00531870
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.0053176f
mov edi, eax
add esp, 0x14
test edi, edi
jne 0x4e125c
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 0x4e1248
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 0x4e1502
mov ecx, dword [0x553d9c]
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 0x4e1502
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ebx, eax
test ebx, ebx
je 0x4e1502
lea ecx, [esp + 0x30]
test ecx, ecx
jne 0x4e1362
mov dword [esp + 0x14], ecx
jmp 0x4e1371
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 0x4e1502
push str._windir_
push esi
call fcn.0053176f
add esp, 8
test eax, eax
je 0x4e13b0
lea esi, [eax + ebx*2]
push str._windir_
push esi
inc edi
call fcn.0053176f
add esp, 8
test eax, eax
jne 0x4e139a
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea esi, [esi + eax*2 + 2]
cmp esi, ebp
jb 0x4e1388
test edi, edi
jle 0x4e1502
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 0x4e13fd
cmp dword [esi - 0xc], 1
jle 0x4e1444
lea ecx, [esi - 0xc]
push ebp
mov dword [esp + 0x20], ecx
lea ecx, [esp + 0x244]
call fcn.00405530
test eax, eax
je 0x4e1502
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 0x4e14ff
push str._windir_
push esi
call fcn.0053176f
mov edi, eax
add esp, 8
test edi, edi
je 0x4e14e1
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.00531870
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.0053176f
mov edi, eax
add esp, 0x14
test edi, edi
jne 0x4e146a
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 0x4e1456
mov esi, dword [esp + 0x240]
mov dword [esi - 8], ebp
push 0
push 1
lea ecx, [esp + 0x248]
call fcn.004136d0
test eax, eax
je 0x4e1722
lea ecx, [esp + 0x10]
push 0
push ecx
call fcn.004b6c40
mov esi, dword [eax]
mov edx, str._drive_
add esp, 8
mov dword [esp + 0x28], esi
test edx, edx
je 0x4e16f3
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ebx, eax
test ebx, ebx
je 0x4e16f3
xor edi, edi
cmp esi, edi
jne 0x4e1559
mov dword [esp + 0x14], edi
jmp 0x4e1564
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 0x4e16f3
push str._drive_
push esi
call fcn.0053176f
add esp, 8
test eax, eax
je 0x4e15a1
lea esi, [eax + ebx*2]
push str._drive_
push esi
inc edi
call fcn.0053176f
add esp, 8
test eax, eax
jne 0x4e158b
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea esi, [esi + eax*2 + 2]
cmp esi, ebp
jb 0x4e1579
test edi, edi
jle 0x4e16f3
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 0x4e15ee
cmp dword [esi - 0xc], 1
jle 0x4e1635
lea ecx, [esi - 0xc]
push ebp
mov dword [esp + 0x20], ecx
lea ecx, [esp + 0x244]
call fcn.00405530
test eax, eax
je 0x4e16f3
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 0x4e16f0
push str._drive_
push esi
call fcn.0053176f
mov edi, eax
add esp, 8
test edi, edi
je 0x4e16d2
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.00531870
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.0053176f
mov edi, eax
add esp, 0x14
test edi, edi
jne 0x4e165b
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 0x4e1647
mov esi, dword [esp + 0x240]
mov dword [esi - 8], ebp
mov eax, dword [esp + 0x10]
mov edx, dword [0x546564]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x4e1722
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x4e1722
mov edx, dword [esp + 0x10]
add edx, 0xfffffff4
push edx
call fcn.00531732
add esp, 4
push 0
push 1
lea ecx, [esp + 0x248]
call fcn.004136d0
test eax, eax
je 0x4e178a
lea eax, [esp + 0x10]
push eax
call fcn.004b6ee0
mov eax, dword [eax]
add esp, 4
lea ecx, [esp + 0x240]
push eax
push str._drive_
call fcn.004139f0
mov eax, dword [esp + 0x10]
mov edx, dword [0x546564]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x4e178a
mov esi, dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
add eax, 0xfffffff4
push eax
call esi
test eax, eax
jg 0x4e1790
mov edx, dword [esp + 0x10]
add edx, 0xfffffff4
push edx
call fcn.00531732
add esp, 4
jmp 0x4e1790
mov esi, dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
push 0
push 1
lea ecx, [esp + 0x248]
call fcn.004136d0
test eax, eax
je 0x4e1810
lea ecx, [esp + 0x20]
call fcn.0050fea0
push 0
push 0
lea ecx, [esp + 0x28]
call fcn.00510c80
lea eax, [esp + 0x10]
lea ecx, [esp + 0x20]
push eax
call fcn.00510700
mov eax, dword [eax]
lea ecx, [esp + 0x240]
push eax
push str._desktop_
call fcn.004139f0
mov eax, dword [esp + 0x10]
mov edx, dword [0x546564]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x4e1807
add eax, 0xfffffff4
push eax
call esi
test eax, eax
jg 0x4e1807
mov edx, dword [esp + 0x10]
add edx, 0xfffffff4
push edx
call fcn.00531732
add esp, 4
lea ecx, [esp + 0x20]
call fcn.0050fe40
push 0
push 1
lea ecx, [esp + 0x248]
call fcn.004136d0
test eax, eax
je 0x4e1890
lea ecx, [esp + 0x20]
call fcn.0050fea0
push 0
push 0x1a
lea ecx, [esp + 0x28]
call fcn.00510c80
lea eax, [esp + 0x10]
lea ecx, [esp + 0x20]
push eax
call fcn.00510700
mov eax, dword [eax]
lea ecx, [esp + 0x240]
push eax
push str._appdata_
call fcn.004139f0
mov eax, dword [esp + 0x10]
mov edx, dword [0x546564]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x4e1887
add eax, 0xfffffff4
push eax
call esi
test eax, eax
jg 0x4e1887
mov edx, dword [esp + 0x10]
add edx, 0xfffffff4
push edx
call fcn.00531732
add esp, 4
lea ecx, [esp + 0x20]
call fcn.0050fe40
push 0
push 1
lea ecx, [esp + 0x248]
call fcn.004136d0
test eax, eax
je 0x4e1910
lea ecx, [esp + 0x20]
call fcn.0050fea0
push 0
push 5
lea ecx, [esp + 0x28]
call fcn.00510c80
lea eax, [esp + 0x10]
lea ecx, [esp + 0x20]
push eax
call fcn.00510700
mov eax, dword [eax]
lea ecx, [esp + 0x240]
push eax
push str._personal_
call fcn.004139f0
mov eax, dword [esp + 0x10]
mov edx, dword [0x546564]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x4e1907
add eax, 0xfffffff4
push eax
call esi
test eax, eax
jg 0x4e1907
mov edx, dword [esp + 0x10]
add edx, 0xfffffff4
push edx
call fcn.00531732
add esp, 4
lea ecx, [esp + 0x20]
call fcn.0050fe40
mov esi, dword [esp + 0x244]
test esi, esi
je 0x4e1972
push 0
push 0x54ebc4
lea ecx, [esp + 0x248]
call fcn.00405c70
test eax, eax
jl 0x4e1972
lea eax, [esp + 0x10]
lea ecx, [esp + 0x20]
push eax
push ecx
mov ecx, esi
call fcn.004daa00
mov ecx, eax
call fcn.00510700
lea ecx, [esp + 0x20]
call fcn.0050fe40
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x240]
push edx
push 0x54ebc4
call fcn.004139f0
lea ecx, [esp + 0x10]
call fcn.00405700
xor esi, esi
mov eax, dword [0x546560]
lea edi, [esi + 1]
push 0x54ebc0
push edi
push 0x54ebc0
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 0x4e1a01
push esi
call fcn.00478470
add esp, 4
test eax, eax
je 0x4e1a01
lea ecx, [esp + 0x10]
lea edx, [esp + 0x20]
push ecx
push edx
mov ecx, eax
call fcn.004daa00
mov ecx, eax
call fcn.00510700
lea ecx, [esp + 0x20]
call fcn.0050fe40
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
push eax
push ecx
lea ecx, [esp + 0x248]
call fcn.004139f0
lea ecx, [esp + 0x10]
call fcn.00405700
lea ecx, [esp + 0x14]
call fcn.00405700
mov esi, edi
cmp esi, 4
jl 0x4e1974
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