Function at 0x10046a40
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x240
mov eax, dword [0x10250150]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, dword [esi + 0x10]
test edi, edi
jne 0x10046a71
pop edi
xor al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10212f74
mov esp, ebp
pop ebp
ret
push ebx
push 0x208
lea eax, [ebp - 0x20c]
mov bl, 1
push 0
push eax
call fcn.102134e7
add esp, 0xc
mov eax, esi
cmp dword [esi + 0x14], 8
jb 0x10046a94
mov eax, dword [esi]
push 7
push str._Winnt_
push 0
push edi
push eax
call fcn.1002d2d0
mov edi, eax
add esp, 0x14
cmp edi, 0xffffffff
je 0x10046ad7
push 0x104
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
test eax, eax
je 0x10046c4c
mov dword [ebp - 0x240], 8
jmp 0x10046c0f
cmp dword [esi + 0x14], 8
mov eax, esi
jb 0x10046ae1
mov eax, dword [esi]
push 8
push str._System_
push 0
push dword [esi + 0x10]
push eax
call fcn.1002d2d0
mov edi, eax
add esp, 0x14
cmp edi, 0xffffffff
je 0x10046b26
push 0x104
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
je 0x10046c4c
mov dword [ebp - 0x240], 9
jmp 0x10046c0f
push 0
push str._Program_Files_
mov ecx, esi
call fcn.100509c0
mov edi, eax
cmp edi, 0xffffffff
je 0x10046b66
lea eax, [ebp - 0x20c]
push 0x104
push eax
call fcn.10185cf0
add esp, 8
test eax, eax
je 0x10046c4c
mov dword [ebp - 0x240], 0x10
jmp 0x10046c0f
push 0
push str._Common_AppData_
mov ecx, esi
call fcn.100509c0
mov edi, eax
push 0
cmp edi, 0xffffffff
je 0x10046ba2
push 0x23
lea eax, [ebp - 0x20c]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
test eax, eax
je 0x10046c4c
mov dword [ebp - 0x240], 0x11
jmp 0x10046c0f
push str._AppData_
mov ecx, esi
call fcn.100509c0
mov edi, eax
push 0
cmp edi, 0xffffffff
je 0x10046bdc
push 0x1a
lea eax, [ebp - 0x20c]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
test eax, eax
je 0x10046c4c
mov dword [ebp - 0x240], 0xa
jmp 0x10046c0f
push str._Temp_
mov ecx, esi
call fcn.100509c0
mov edi, eax
cmp edi, 0xffffffff
je 0x10046c4c
lea eax, [ebp - 0x20c]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
je 0x10046c4c
mov dword [ebp - 0x240], 7
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashW]
lea ecx, [ebp - 0x20c]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10046c25
sub ecx, edx
lea eax, [ebp - 0x20c]
sar ecx, 1
push ecx
push eax
push dword [ebp - 0x240]
mov ecx, esi
push edi
call fcn.10008700
jmp 0x10046c4e
xor bl, bl
mov edi, dword [esi + 0x14]
mov eax, esi
cmp edi, 8
jb 0x10046c5a
mov eax, dword [esi]
push 1
push 0x1021cd78
push 0
push dword [esi + 0x10]
push eax
call fcn.1002d2d0
add esp, 0x14
mov dword [ebp - 0x240], eax
cmp eax, 0xffffffff
je 0x10046d72
mov ecx, esi
cmp edi, 8
jb 0x10046c87
mov ecx, dword [esi]
push 1
push 0x1021cffc
push 0
push dword [esi + 0x10]
push ecx
call fcn.1002d2d0
add esp, 0x14
cmp eax, 0xffffffff
je 0x10046cf9
push 0x10219e0c
lea ecx, [ebp - 0x23c]
call fcn.10006b40
push 0x1021cffc
lea ecx, [ebp - 0x224]
call fcn.10006b40
push dword [ebp - 0x240]
lea eax, [ebp - 0x23c]
push eax
lea eax, [ebp - 0x224]
push eax
push esi
call fcn.10007650
add esp, 0x10
lea ecx, [ebp - 0x224]
call fcn.1001d6d0
lea ecx, [ebp - 0x23c]
call fcn.1001d6d0
mov edi, dword [esi + 0x14]
mov bl, 1
mov eax, dword [esi + 0x10]
mov ecx, esi
cmp edi, 8
jb 0x10046d05
mov ecx, dword [esi]
push 2
push 0x1021cff4
push 0
push eax
push ecx
call fcn.1002d2d0
add esp, 0x14
cmp eax, 0xffffffff
je 0x10046d72
push 0x10219e0c
lea ecx, [ebp - 0x224]
call fcn.10006b40
push 0x1021cff4
lea ecx, [ebp - 0x23c]
call fcn.10006b40
push dword [ebp - 0x240]
lea eax, [ebp - 0x224]
push eax
lea eax, [ebp - 0x23c]
push eax
push esi
call fcn.10007650
add esp, 0x10
lea ecx, [ebp - 0x23c]
call fcn.1001d6d0
lea ecx, [ebp - 0x224]
call fcn.1001d6d0
mov bl, 1
mov ecx, dword [ebp - 4]
mov al, bl
pop ebx
pop edi
xor ecx, ebp
pop esi
call fcn.10212f74
mov esp, ebp
pop ebp
ret