Function at 0x40cf20
Capabilities:
Get common file path

Disassembly:
sub esp, 0x108
mov eax, dword [0x42c2e4]
xor eax, esp
mov dword [esp + 0x104], eax
mov eax, dword [esp + 0x110]
cmp eax, 0xd
push ebx
mov ebx, dword [esp + 0x110]
push esi
mov esi, dword [esp + 0x11c]
push edi
mov edi, dword [esp + 0x124]
ja case.default.0x40cf58
jmp dword [eax*4 + 0x40d384]
call fcn.0040ef00
test eax, eax
je 0x40cf97
lea eax, [esp + 0xc]
push eax
push 0x19
push 0
call fcn.0040e5d0
add esp, 0xc
test eax, eax
jne 0x40cfac
pop edi
pop esi
xor al, al
pop ebx
mov ecx, dword [esp + 0x104]
xor ecx, esp
call fcn.004121f9
add esp, 0x108
ret
lea ecx, [esp + 0xc]
push ecx
push 0x10
push 0
call fcn.0040e5d0
add esp, 0xc
test eax, eax
je case.default.0x40cf58
lea edx, [esp + 0xc]
push edx
push 0x104
push esi
call fcn.004128b7
add esp, 0xc
cmp byte [esp + 0x128], 0
je 0x40cff4
lea eax, [esp + 0xc]
push eax
call fcn.0040e060
push str.eptemp.___
lea ecx, [esp + 0x14]
push 0x104
push ecx
call fcn.0041291c
lea edx, [esp + 0x1c]
push edx
call fcn.0040e060
add esp, 0x14
lea eax, [esp + 0xc]
push eax
call fcn.0040e060
push edi
lea ecx, [esp + 0x14]
push ecx
jmp 0x40d34d
call fcn.0040ef00
test eax, eax
je 0x40d02c
lea edx, [esp + 0xc]
push edx
push 0x23
push 0
call fcn.0040e5d0
add esp, 0xc
test eax, eax
jne 0x40d045
jmp case.default.0x40cf58
lea eax, [esp + 0xc]
push eax
push 0x1a
push 0
call fcn.0040e5d0
add esp, 0xc
test eax, eax
je case.default.0x40cf58
lea ecx, [esp + 0xc]
push ecx
push 0x104
push esi
call fcn.004128b7
add esp, 0xc
cmp byte [esp + 0x128], 0
je 0x40d08d
lea edx, [esp + 0xc]
push edx
call fcn.0040e060
push str.eptemp.___
lea eax, [esp + 0x14]
push 0x104
push eax
call fcn.0041291c
lea ecx, [esp + 0x1c]
push ecx
call fcn.0040e060
add esp, 0x14
lea edx, [esp + 0xc]
push edx
call fcn.0040e060
push edi
lea eax, [esp + 0x14]
push eax
jmp 0x40d34d
lea ecx, [esp + 0xc]
push ecx
push 0x1a
jmp 0x40cf9e
lea edx, [esp + 0xc]
push edx
push 0x28
push 0
call fcn.0040e5d0
add esp, 0xc
test eax, eax
je case.default.0x40cf58
lea eax, [esp + 0xc]
push eax
push 0x104
push esi
call fcn.004128b7
add esp, 0xc
cmp byte [esp + 0x128], 0
je 0x40d33d
lea ecx, [esp + 0xc]
push ecx
call fcn.0040e060
push str.eptemp.___
lea edx, [esp + 0x14]
push 0x104
push edx
call fcn.0041291c
lea eax, [esp + 0x1c]
push eax
call fcn.0040e060
add esp, 0x14
jmp 0x40d33d
lea eax, [esp + 0xc]
push eax
push 0x23
push 0
call fcn.0040e5d0
add esp, 0xc
test eax, eax
je case.default.0x40cf58
lea ecx, [esp + 0xc]
push ecx
call fcn.0040e790
lea edx, [esp + 0x10]
push edx
call fcn.0040e0a0
lea eax, [esp + 0x14]
push eax
push 0x104
push esi
call fcn.004128b7
add esp, 0x14
jmp 0x40d0da
lea eax, [esp + 0xc]
push eax
push 0x26
jmp 0x40d033
push 0x104
lea ecx, [esp + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
test eax, eax
je case.default.0x40cf58
lea edx, [esp + 0xc]
push edx
push 0x104
push esi
call fcn.004128b7
add esp, 0xc
cmp byte [esp + 0x128], 0
je 0x40d08d
lea eax, [esp + 0xc]
push eax
call fcn.0040e060
push str.eptemp.___
lea ecx, [esp + 0x14]
push 0x104
push ecx
call fcn.0041291c
add esp, 0x10
lea edx, [esp + 0xc]
push edx
call fcn.0040e060
push edi
lea eax, [esp + 0x14]
push eax
jmp 0x40d34d
push 0x104
lea ecx, [esp + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
jmp 0x40d176
lea ecx, [esp + 0xc]
push ecx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
je case.default.0x40cf58
lea edx, [esp + 0xc]
push edx
push 0x104
push esi
call fcn.004128b7
lea eax, [esp + 0x18]
push eax
call fcn.0040e060
push str.eptemp.___
lea ecx, [esp + 0x20]
push 0x104
push ecx
call fcn.0041291c
lea edx, [esp + 0x28]
push edx
call fcn.0040e060
lea eax, [esp + 0x2c]
push edi
push eax
call fcn.00401f50
add esp, 0x28
jmp 0x40d355
push 0x104
lea ecx, [esp + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
test eax, eax
je case.default.0x40cf58
mov byte [esp + 0xf], 0
jmp 0x40d17e
push 0x104
lea ecx, [esp + 0x10]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
je case.default.0x40cf58
lea edx, [esp + 0xc]
push edx
call fcn.0040dfc0
mov byte [eax], 0
lea eax, [esp + 0x10]
push eax
call fcn.0040e0a0
lea ecx, [esp + 0x14]
push ecx
push 0x104
push esi
call fcn.004128b7
add esp, 0x14
jmp 0x40d312
push edi
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea ecx, [esp + 0xc]
push ecx
call fcn.0040e0a0
lea edx, [esp + 0x10]
push edx
push 0x104
push esi
call fcn.004128b7
add esp, 0x10
jmp 0x40d355
lea eax, [esp + 0xc]
push eax
push 0x10
jmp 0x40d2ed
lea eax, [esp + 0xc]
push eax
push 5
push 0
call fcn.0040e5d0
add esp, 0xc
test eax, eax
je case.default.0x40cf58
lea ecx, [esp + 0xc]
push ecx
push 0x104
push esi
call fcn.004128b7
add esp, 0xc
cmp byte [esp + 0x128], 0
je 0x40d33d
lea edx, [esp + 0xc]
push edx
call fcn.0040e060
push str.eptemp.___
lea eax, [esp + 0x14]
push 0x104
push eax
call fcn.0041291c
add esp, 0x10
lea ecx, [esp + 0xc]
push ecx
call fcn.0040e060
push edi
lea edx, [esp + 0x14]
push edx
call fcn.00401f50
add esp, 0xc
lea eax, [esp + 0xc]
push eax
push 0x104
push ebx
call fcn.004128b7
mov ecx, dword [esp + 0x11c]
add esp, 0xc
pop edi
pop esi
pop ebx
xor ecx, esp
mov al, 1
call fcn.004121f9
add esp, 0x108
ret