Function at 0x10045350
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x240
mov eax, dword [0x102519c8]
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 0x10045381
pop edi
xor al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.101f99c6
mov esp, ebp
pop ebp
ret
push ebx
push 0x208
lea eax, [ebp - 0x20c]
mov bl, 1
push 0
push eax
call fcn.101f9fcf
add esp, 0xc
mov eax, esi
cmp dword [esi + 0x14], 8
jb 0x100453a4
mov eax, dword [esi]
push 7
push str._Winnt_
push 0
push edi
push eax
call fcn.1002bcf0
mov edi, eax
add esp, 0x14
cmp edi, 0xffffffff
je 0x100453e7
push 0x104
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
test eax, eax
je 0x1004555c
mov dword [ebp - 0x240], 8
jmp 0x1004551f
cmp dword [esi + 0x14], 8
mov eax, esi
jb 0x100453f1
mov eax, dword [esi]
push 8
push str._System_
push 0
push dword [esi + 0x10]
push eax
call fcn.1002bcf0
mov edi, eax
add esp, 0x14
cmp edi, 0xffffffff
je 0x10045436
push 0x104
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
je 0x1004555c
mov dword [ebp - 0x240], 9
jmp 0x1004551f
push 0
push str._Program_Files_
mov ecx, esi
call fcn.1004e700
mov edi, eax
cmp edi, 0xffffffff
je 0x10045476
lea eax, [ebp - 0x20c]
push 0x104
push eax
call fcn.10174e10
add esp, 8
test eax, eax
je 0x1004555c
mov dword [ebp - 0x240], 0x10
jmp 0x1004551f
push 0
push str._Common_AppData_
mov ecx, esi
call fcn.1004e700
mov edi, eax
push 0
cmp edi, 0xffffffff
je 0x100454b2
push 0x23
lea eax, [ebp - 0x20c]
push eax
push 0
call dword [0x102023e4]
test eax, eax
je 0x1004555c
mov dword [ebp - 0x240], 0x11
jmp 0x1004551f
push str._AppData_
mov ecx, esi
call fcn.1004e700
mov edi, eax
push 0
cmp edi, 0xffffffff
je 0x100454ec
push 0x1a
lea eax, [ebp - 0x20c]
push eax
push 0
call dword [0x102023e4]
test eax, eax
je 0x1004555c
mov dword [ebp - 0x240], 0xa
jmp 0x1004551f
push str._Temp_
mov ecx, esi
call fcn.1004e700
mov edi, eax
cmp edi, 0xffffffff
je 0x1004555c
lea eax, [ebp - 0x20c]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
je 0x1004555c
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 0x10045535
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.10007630
jmp 0x1004555e
xor bl, bl
mov edi, dword [esi + 0x14]
mov eax, esi
cmp edi, 8
jb 0x1004556a
mov eax, dword [esi]
push 1
push 0x102053b4
push 0
push dword [esi + 0x10]
push eax
call fcn.1002bcf0
add esp, 0x14
mov dword [ebp - 0x240], eax
cmp eax, 0xffffffff
je 0x10045682
mov ecx, esi
cmp edi, 8
jb 0x10045597
mov ecx, dword [esi]
push 1
push 0x102054a0
push 0
push dword [esi + 0x10]
push ecx
call fcn.1002bcf0
add esp, 0x14
cmp eax, 0xffffffff
je 0x10045609
push 0x10202944
lea ecx, [ebp - 0x23c]
call fcn.10020470
push 0x102054a0
lea ecx, [ebp - 0x224]
call fcn.10020470
push dword [ebp - 0x240]
lea eax, [ebp - 0x23c]
push eax
lea eax, [ebp - 0x224]
push eax
push esi
call fcn.10006610
add esp, 0x10
lea ecx, [ebp - 0x224]
call fcn.10005250
lea ecx, [ebp - 0x23c]
call fcn.10005250
mov edi, dword [esi + 0x14]
mov bl, 1
mov eax, dword [esi + 0x10]
mov ecx, esi
cmp edi, 8
jb 0x10045615
mov ecx, dword [esi]
push 2
push 0x10205498
push 0
push eax
push ecx
call fcn.1002bcf0
add esp, 0x14
cmp eax, 0xffffffff
je 0x10045682
push 0x10202944
lea ecx, [ebp - 0x224]
call fcn.10020470
push 0x10205498
lea ecx, [ebp - 0x23c]
call fcn.10020470
push dword [ebp - 0x240]
lea eax, [ebp - 0x224]
push eax
lea eax, [ebp - 0x23c]
push eax
push esi
call fcn.10006610
add esp, 0x10
lea ecx, [ebp - 0x23c]
call fcn.10005250
lea ecx, [ebp - 0x224]
call fcn.10005250
mov bl, 1
mov ecx, dword [ebp - 4]
mov al, bl
pop ebx
pop edi
xor ecx, ebp
pop esi
call fcn.101f99c6
mov esp, ebp
pop ebp
ret