Function at 0x40c0e0
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42e570
mov eax, dword fs:[0]
push eax
sub esp, 0x2a4
mov eax, dword [0x4376f4]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
xor eax, eax
mov dword [ebp - 4], eax
mov ebx, ecx
mov dword [ebp - 0x298], ebx
mov dword [ebp - 0x2a8], eax
mov dword [ebp - 0x2a4], eax
mov dword [ebp - 0x2a0], eax
push str.type
push ebx
mov byte [ebp - 4], 1
call fcn.00405630
lea esi, [ebp - 0x254]
mov ecx, eax
call fcn.004051a0
mov byte [ebp - 4], 2
mov esi, dword [ebp - 0x244]
mov eax, esi
cmp esi, 7
jb 0x40c162
mov eax, 7
mov edi, dword [ebp - 0x240]
mov edx, dword [ebp - 0x254]
cmp edi, 0x10
jae 0x40c179
lea edx, [ebp - 0x254]
mov ecx, str.DIRPGRM
call fcn.00401040
test eax, eax
jne 0x40c19b
cmp esi, 7
jae 0x40c191
or eax, 0xffffffff
jmp 0x40c199
xor eax, eax
cmp esi, 7
setne al
test eax, eax
sete al
test al, al
je 0x40c361
push str.IsWow64Process
push str.kernel32
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
xor edi, edi
mov esi, eax
mov dword [ebp - 0x294], edi
cmp esi, edi
je 0x40c1e3
lea eax, [ebp - 0x294]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call esi
cmp eax, edi
je 0x40c306
cmp dword [ebp - 0x294], 1
sete al
test al, al
je 0x40c306
push str.forceNativeCheck
push ebx
call fcn.00405630
call fcn.004053c0
mov dword [ebp - 0x228], edi
mov byte [ebp - 0x238], 0
lea ecx, [ebp - 0x238]
test al, al
je 0x40c26d
push 0x11
mov ebx, 0xf
push str.C:Program_Files_
mov dword [ebp - 0x224], ebx
call fcn.00401980
lea ecx, [ebp - 0x238]
lea edi, [ebp - 0x2a8]
mov byte [ebp - 4], 3
call fcn.00406580
mov byte [ebp - 4], 2
cmp dword [ebp - 0x224], 0x10
jb 0x40c61d
mov ecx, dword [ebp - 0x238]
push ecx
call fcn.004185a3
add esp, 4
jmp 0x40c61d
push 0x17
mov esi, 0xf
push str.C:Program_Files__x86__
mov dword [ebp - 0x224], esi
call fcn.00401980
lea ecx, [ebp - 0x238]
lea edi, [ebp - 0x2a8]
mov byte [ebp - 4], 4
call fcn.00406580
mov ebx, 0x10
mov byte [ebp - 4], 2
cmp dword [ebp - 0x224], ebx
jb 0x40c2b9
mov edx, dword [ebp - 0x238]
push edx
call fcn.004185a3
add esp, 4
push 0x11
push str.C:Program_Files_
lea ecx, [ebp - 0x238]
mov dword [ebp - 0x224], esi
mov dword [ebp - 0x228], 0
mov byte [ebp - 0x238], 0
call fcn.00401980
lea ecx, [ebp - 0x238]
lea edi, [ebp - 0x2a8]
mov byte [ebp - 4], 5
call fcn.00406580
mov byte [ebp - 4], 2
cmp dword [ebp - 0x224], ebx
jmp 0x40c607
push 0x11
push str.C:Program_Files_
lea ecx, [ebp - 0x238]
mov dword [ebp - 0x224], 0xf
mov dword [ebp - 0x228], edi
mov byte [ebp - 0x238], 0
call fcn.00401980
lea ecx, [ebp - 0x238]
lea edi, [ebp - 0x2a8]
mov byte [ebp - 4], 6
call fcn.00406580
mov byte [ebp - 4], 2
cmp dword [ebp - 0x224], 0x10
jb 0x40c618
mov ecx, dword [ebp - 0x238]
push ecx
jmp 0x40c610
mov eax, esi
cmp esi, 3
jb 0x40c36d
mov eax, 3
mov edx, dword [ebp - 0x254]
cmp edi, 0x10
jae 0x40c37e
lea edx, [ebp - 0x254]
mov ecx, 0x4327fc
call fcn.00401040
xor ebx, ebx
cmp eax, ebx
jne 0x40c3a2
cmp esi, 3
jae 0x40c398
or eax, 0xffffffff
jmp 0x40c3a0
xor eax, eax
cmp esi, 3
setne al
cmp eax, ebx
sete al
mov dword [ebp - 0x224], 0xf
mov dword [ebp - 0x228], ebx
mov byte [ebp - 0x238], bl
test al, al
je 0x40c402
push ebx
push 0x432109
lea ecx, [ebp - 0x238]
call fcn.00401980
lea ecx, [ebp - 0x238]
lea edi, [ebp - 0x2a8]
mov byte [ebp - 4], 7
call fcn.00406580
mov byte [ebp - 4], 2
cmp dword [ebp - 0x224], 0x10
jb 0x40c618
mov edx, dword [ebp - 0x238]
push edx
jmp 0x40c610
mov ecx, str.DIRADR
lea edi, [ebp - 0x254]
mov byte [ebp - 4], 8
call fcn.00412190
test al, al
je 0x40c510
lea eax, [ebp - 0x21c]
push eax
push ebx
push ebx
push 0x1a
push ebx
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
js 0x40c5fc
xor ecx, ecx
lea eax, [ebp - 0x21c]
mov dword [ebp - 0x278], 7
mov dword [ebp - 0x27c], ebx
mov word [ebp - 0x28c], cx
lea edx, [eax + 2]
lea ebx, [ebx]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x40c460
sub eax, edx
sar eax, 1
push eax
lea eax, [ebp - 0x21c]
lea ecx, [ebp - 0x28c]
call fcn.0040a370
mov bl, 9
lea eax, [ebp - 0x28c]
lea esi, [ebp - 0x270]
mov byte [ebp - 4], bl
call fcn.00415540
mov edi, eax
lea esi, [ebp - 0x238]
mov byte [ebp - 4], 0xa
call fcn.00401750
lea ecx, [ebp - 0x270]
mov byte [ebp - 4], bl
call fcn.00401720
mov edx, dword [ebp - 0x228]
dec edx
push edx
xor ecx, ecx
lea esi, [ebp - 0x270]
lea edx, [ebp - 0x238]
call fcn.0040a1f0
mov edi, eax
lea esi, [ebp - 0x238]
mov byte [ebp - 4], 0xb
call fcn.00401750
lea ecx, [ebp - 0x270]
mov byte [ebp - 4], bl
call fcn.00401720
push 0x4327ec
mov eax, esi
push eax
lea ecx, [ebp - 0x270]
push ecx
call fcn.004121f0
add esp, 0xc
mov byte [ebp - 4], 0xc
jmp 0x40c5d9
mov ecx, str.DIRADL
lea edi, [ebp - 0x254]
call fcn.00412190
test al, al
je 0x40c5fc
lea edx, [ebp - 0x21c]
push edx
push ebx
push ebx
push 0x1c
push ebx
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
js 0x40c5fc
lea eax, [ebp - 0x21c]
lea esi, [ebp - 0x28c]
call fcn.0040a250
mov eax, esi
mov bl, 0xd
lea esi, [ebp - 0x270]
mov byte [ebp - 4], bl
call fcn.00415540
mov edi, eax
lea esi, [ebp - 0x238]
mov byte [ebp - 4], 0xe
call fcn.00401750
lea ecx, [ebp - 0x270]
mov byte [ebp - 4], bl
call fcn.00401720
mov eax, dword [ebp - 0x228]
dec eax
push eax
xor ecx, ecx
lea esi, [ebp - 0x270]
lea edx, [ebp - 0x238]
call fcn.0040a1f0
mov edi, eax
lea esi, [ebp - 0x238]
mov byte [ebp - 4], 0xf
call fcn.00401750
lea ecx, [ebp - 0x270]
mov byte [ebp - 4], bl
call fcn.00401720
push 0x4327ec
mov ecx, esi
push ecx
lea edx, [ebp - 0x270]
push edx
call fcn.004121f0
add esp, 0xc
mov byte [ebp - 4], 0x10
mov ecx, eax
lea ebx, [ebp - 0x2a8]
call fcn.00406380
lea ecx, [ebp - 0x270]
call fcn.00401720
lea esi, [ebp - 0x28c]
call fcn.0040a290
mov byte [ebp - 4], 2
cmp dword [ebp - 0x224], 0x10
jb 0x40c618
mov eax, dword [ebp - 0x238]
push eax
call fcn.004185a3
add esp, 4
mov ebx, 0xf
mov ecx, dword [ebp - 0x298]
cmp byte [ecx + 8], 0
jne 0x40c630
mov eax, 0x439888
jmp 0x40c671
mov edx, ecx
mov esi, dword [edx]
lea eax, [ebp - 0x2b0]
lea ebx, [ebp - 0x294]
mov ecx, esi
mov dword [ebp - 0x2b0], str.exact
mov dword [ebp - 0x2ac], 0
call fcn.00406050
mov eax, dword [eax]
mov ebx, 0xf
cmp eax, dword [esi + 4]
jne 0x40c66e
mov eax, 0x439888
jmp 0x40c671
add eax, 0x18
mov edi, dword [ebp - 0x2a8]
cmp eax, 0x439888
setne al
test al, al
je 0x40c6a4
mov eax, dword [ebp - 0x298]
push str.exact
push eax
call fcn.00405630
call fcn.004053c0
mov byte [ebp - 0x28d], 1
test al, al
je 0x40c6ab
mov byte [ebp - 0x28d], 0
xor esi, esi
lea ecx, [ecx]
mov ecx, dword [ebp - 0x2a4]
sub ecx, edi
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
cmp esi, ecx
jae 0x40c877
cmp byte [ebp - 0x28d], 0
je 0x40c7a9
push 1
sub esp, 0x1c
mov ecx, esp
mov dword [ebp - 0x294], esp
lea edx, [esi*8]
push 0xffffffffffffffff
sub edx, esi
lea eax, [edi + edx*4]
push 0
mov dword [ecx + 0x14], ebx
mov dword [ecx + 0x10], 0
push eax
mov byte [ecx], 0
call fcn.00401b70
mov eax, dword [ebp - 0x298]
push eax
call fcn.0040f430
add esp, 0x24
cmp eax, 1
jne 0x40c871
cmp dword [ebp - 0x240], 0x10
mov edi, eax
jb 0x40c742
mov ecx, dword [ebp - 0x254]
push ecx
call fcn.004185a3
add esp, 4
cmp dword [ebp - 0x2a8], 0
mov dword [ebp - 0x240], ebx
mov dword [ebp - 0x244], 0
mov byte [ebp - 0x254], 0
je 0x40c7a2
mov esi, dword [ebp - 0x2a8]
cmp esi, dword [ebp - 0x2a4]
je 0x40c793
cmp dword [esi + 0x14], 0x10
jb 0x40c781
mov edx, dword [esi]
push edx
call fcn.004185a3
add esp, 4
mov dword [esi + 0x14], ebx
mov dword [esi + 0x10], 0
mov byte [esi], 0
add esi, 0x1c
jmp 0x40c768
mov eax, dword [ebp - 0x2a8]
push eax
call fcn.004185a3
add esp, 4
mov eax, edi
jmp 0x40c8e6
sub esp, 0x1c
lea ecx, [esi*8]
sub ecx, esi
lea eax, [edi + ecx*4]
mov ecx, esp
mov dword [ebp - 0x294], esp
push 0xffffffffffffffff
push 0
mov dword [ecx + 0x14], ebx
mov dword [ecx + 0x10], 0
push eax
mov byte [ecx], 0
call fcn.00401b70
mov edx, dword [ebp - 0x298]
push edx
call fcn.0040fde0
add esp, 0x20
cmp eax, 1
jne 0x40c871
cmp dword [ebp - 0x240], 0x10
mov edi, eax
jb 0x40c809
mov eax, dword [ebp - 0x254]
push eax
call fcn.004185a3
add esp, 4
cmp dword [ebp - 0x2a8], 0
mov dword [ebp - 0x240], ebx
mov dword [ebp - 0x244], 0
mov byte [ebp - 0x254], 0
je 0x40c7a2
mov esi, dword [ebp - 0x2a8]
cmp esi, dword [ebp - 0x2a4]
je 0x40c85e
cmp dword [esi + 0x14], 0x10
jb 0x40c84c
mov ecx, dword [esi]
push ecx
call fcn.004185a3
add esp, 4
mov dword [esi + 0x14], ebx
mov dword [esi + 0x10], 0
mov byte [esi], 0
add esi, 0x1c
jmp 0x40c833
mov edx, dword [ebp - 0x2a8]
push edx
call fcn.004185a3
add esp, 4
mov eax, edi
jmp 0x40c8e6
inc esi
jmp 0x40c6b0
cmp dword [ebp - 0x240], 0x10
jb 0x40c88f
mov eax, dword [ebp - 0x254]
push eax
call fcn.004185a3
add esp, 4
mov dword [ebp - 0x240], ebx
mov dword [ebp - 0x244], 0
mov byte [ebp - 0x254], 0
test edi, edi
je 0x40c8e4
mov esi, edi
lea esp, [esp]
cmp esi, dword [ebp - 0x2a4]
je 0x40c8db
cmp dword [esi + 0x14], 0x10
jb 0x40c8c9
mov ecx, dword [esi]
push ecx
call fcn.004185a3
add esp, 4
mov dword [esi + 0x14], ebx
mov dword [esi + 0x10], 0
mov byte [esi], 0
add esi, 0x1c
jmp 0x40c8b0
push edi
call fcn.004185a3
add esp, 4
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0041836d
mov esp, ebp
pop ebp
ret