Function at 0x409ed0
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x5c4
mov eax, dword [0x427250]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov byte [ebp - 0x110], 0
push 0x103
push 0
lea eax, [ebp - 0x10f]
push eax
call fcn.0040d600
add esp, 0xc
lea ecx, [ebp - 0x110]
push ecx
push 0
push 0
push 0x23
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathA]
lea edx, [ebp - 0x110]
push edx
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashA]
lea eax, [ebp - 0x110]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ecx, 0x104
sub ecx, eax
push ecx
push str.storm_
lea edx, [ebp - 0x110]
push edx
call dword [sym.imp.SHLWAPI.dll_StrNCatA]
mov eax, dword [ebp + 0x10]
push eax
push 0
mov ecx, dword [ebp + 0xc]
push ecx
call fcn.0040d600
add esp, 0xc
mov dword [ebp - 0x258], 0
push 0x13c
push 0
lea edx, [ebp - 0x254]
push edx
call fcn.0040d600
add esp, 0xc
lea eax, [ebp - 0x110]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, eax
push 0x422f08
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add esi, eax
mov dword [ebp - 0x114], esi
mov ecx, dword [ebp - 0x114]
cmp ecx, dword [ebp + 0x10]
jge 0x409fcf
push 0x422f14
lea edx, [ebp - 0x110]
push edx
push 0x422f20
mov eax, dword [ebp - 0x114]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
call fcn.0040de09
add esp, 0x14
jmp 0x409fd9
mov eax, 0x80004005
jmp 0x40a1fc
lea edx, [ebp - 0x258]
push edx
mov eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
push eax
lea ecx, [ebp - 0x118]
call fcn.0040ad80
lea ecx, [ebp - 0x118]
call fcn.0040ad60
movzx ecx, al
test ecx, ecx
je 0x40a03f
cmp dword [ebp - 0x238], 0
jne 0x40a01a
cmp dword [ebp - 0x23c], 0
je 0x40a03f
mov dword [ebp - 0x5bc], 0
lea ecx, [ebp - 0x118]
call fcn.0040ada0
mov eax, dword [ebp - 0x5bc]
jmp 0x40a1fc
mov byte [ebp - 0x368], 0
push 0x103
push 0
lea edx, [ebp - 0x367]
push edx
call fcn.0040d600
add esp, 0xc
push 0x104
lea eax, [ebp - 0x368]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea edx, [ebp - 0x368]
push edx
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecA]
lea eax, [ebp - 0x368]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashA]
lea ecx, [ebp - 0x368]
push ecx
call fcn.00409e60
add esp, 4
mov dword [ebp - 0x36c], eax
mov byte [ebp - 0x5b8], 0
push 0x103
push 0
lea edx, [ebp - 0x5b7]
push edx
call fcn.0040d600
add esp, 0xc
mov eax, dword [ebp - 0x36c]
push eax
lea ecx, [ebp - 0x368]
push ecx
lea edx, [ebp - 0x5b8]
push edx
call fcn.0040da70
add esp, 0xc
mov eax, dword [ebp + 0x10]
push eax
push 0
mov ecx, dword [ebp + 0xc]
push ecx
call fcn.0040d600
add esp, 0xc
mov dword [ebp - 0x4b0], 0
push 0x13c
push 0
lea edx, [ebp - 0x4ac]
push edx
call fcn.0040d600
add esp, 0xc
lea eax, [ebp - 0x5b8]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, eax
push 0x422f28
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add esi, eax
mov dword [ebp - 0x25c], esi
push str.current.ecs
lea ecx, [ebp - 0x5b8]
push ecx
push str._s_s
mov edx, dword [ebp - 0x25c]
push edx
mov eax, dword [ebp + 0xc]
push eax
call fcn.0040de09
add esp, 0x14
lea ecx, [ebp - 0x4b0]
push ecx
mov edx, dword [ebp + 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
push eax
lea ecx, [ebp - 0x260]
call fcn.0040ad80
lea ecx, [ebp - 0x260]
call fcn.0040ad60
movzx eax, al
test eax, eax
je 0x40a1be
cmp dword [ebp - 0x490], 0
jne 0x40a194
cmp dword [ebp - 0x494], 0
je 0x40a1be
mov dword [ebp - 0x5c0], 0
lea ecx, [ebp - 0x260]
call fcn.0040ada0
lea ecx, [ebp - 0x118]
call fcn.0040ada0
mov eax, dword [ebp - 0x5c0]
jmp 0x40a1fc
mov dword [ebp - 0x5c4], 0x80004005
lea ecx, [ebp - 0x260]
call fcn.0040ada0
lea ecx, [ebp - 0x118]
call fcn.0040ada0
mov eax, dword [ebp - 0x5c4]
jmp 0x40a1fc
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040d67a
mov esp, ebp
pop ebp
ret