Function at 0x40b8b0
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42e650
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, 4
jb 0x40b932
mov eax, 4
mov edi, dword [ebp - 0x240]
mov edx, dword [ebp - 0x254]
cmp edi, 0x10
jae 0x40b949
lea edx, [ebp - 0x254]
mov ecx, str.PGRM
call fcn.00401040
test eax, eax
jne 0x40b96b
cmp esi, 4
jae 0x40b961
or eax, 0xffffffff
jmp 0x40b969
xor eax, eax
cmp esi, 4
setne al
test eax, eax
sete al
test al, al
je 0x40bb31
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 0x40b9b3
lea eax, [ebp - 0x294]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call esi
cmp eax, edi
je 0x40bad6
cmp dword [ebp - 0x294], 1
sete al
test al, al
je 0x40bad6
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 0x40ba3d
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 0x40bded
mov ecx, dword [ebp - 0x238]
push ecx
call fcn.004185a3
add esp, 4
jmp 0x40bded
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 0x40ba89
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 0x40bdd7
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 0x40bde8
mov ecx, dword [ebp - 0x238]
push ecx
jmp 0x40bde0
mov eax, esi
cmp esi, 4
jb 0x40bb3d
mov eax, 4
mov edx, dword [ebp - 0x254]
cmp edi, 0x10
jae 0x40bb4e
lea edx, [ebp - 0x254]
mov ecx, str.FILE
call fcn.00401040
xor ebx, ebx
cmp eax, ebx
jne 0x40bb72
cmp esi, 4
jae 0x40bb68
or eax, 0xffffffff
jmp 0x40bb70
xor eax, eax
cmp esi, 4
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 0x40bbd2
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 0x40bde8
mov edx, dword [ebp - 0x238]
push edx
jmp 0x40bde0
mov ecx, 0x4327e0
lea edi, [ebp - 0x254]
mov byte [ebp - 4], 8
call fcn.00412190
test al, al
je 0x40bce0
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 0x40bdcc
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 0x40bc30
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 0x4327e4
mov eax, esi
push eax
lea ecx, [ebp - 0x270]
push ecx
call fcn.004121f0
add esp, 0xc
mov byte [ebp - 4], 0xc
jmp 0x40bda9
mov ecx, 0x4327e8
lea edi, [ebp - 0x254]
call fcn.00412190
test al, al
je 0x40bdcc
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 0x40bdcc
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 0x4327e4
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 0x40bde8
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 0x40be00
mov eax, 0x439888
jmp 0x40be41
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 0x40be3e
mov eax, 0x439888
jmp 0x40be41
add eax, 0x18
mov edi, dword [ebp - 0x2a8]
cmp eax, 0x439888
setne al
test al, al
je 0x40be74
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 0x40be7b
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 0x40c047
cmp byte [ebp - 0x28d], 0
je 0x40bf79
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.0040e980
add esp, 0x24
cmp eax, 1
jne 0x40c041
cmp dword [ebp - 0x240], 0x10
mov edi, eax
jb 0x40bf12
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 0x40bf72
mov esi, dword [ebp - 0x2a8]
cmp esi, dword [ebp - 0x2a4]
je 0x40bf63
cmp dword [esi + 0x14], 0x10
jb 0x40bf51
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 0x40bf38
mov eax, dword [ebp - 0x2a8]
push eax
call fcn.004185a3
add esp, 4
mov eax, edi
jmp 0x40c0b6
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.0040f320
add esp, 0x20
cmp eax, 1
jne 0x40c041
cmp dword [ebp - 0x240], 0x10
mov edi, eax
jb 0x40bfd9
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 0x40bf72
mov esi, dword [ebp - 0x2a8]
cmp esi, dword [ebp - 0x2a4]
je 0x40c02e
cmp dword [esi + 0x14], 0x10
jb 0x40c01c
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 0x40c003
mov edx, dword [ebp - 0x2a8]
push edx
call fcn.004185a3
add esp, 4
mov eax, edi
jmp 0x40c0b6
inc esi
jmp 0x40be80
cmp dword [ebp - 0x240], 0x10
jb 0x40c05f
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 0x40c0b4
mov esi, edi
lea esp, [esp]
cmp esi, dword [ebp - 0x2a4]
je 0x40c0ab
cmp dword [esi + 0x14], 0x10
jb 0x40c099
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 0x40c080
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