Function at 0x40bdf0
Capabilities:
Get common file path
Get file attributes

Disassembly:
sub esp, 0x324
push ebx
push ebp
push esi
push edi
lea eax, [esp + 0x230]
xor ebx, ebx
push 0x104
push eax
mov dword [esp + 0x18], ebx
mov dword [esp + 0x1c], ebx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
lea ecx, [esp + 0x12c]
push 0x104
push ecx
mov dword [esp + 0x28], eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
mov esi, dword [sym.imp.MSVCRT.dll__mbslwr]
lea edx, [esp + 0x12c]
push edx
mov dword [esp + 0x20], eax
call esi
lea eax, [esp + 0x234]
push eax
call esi
add esp, 8
lea ecx, [esp + 0x10]
push ecx
push 1
mov ecx, 0x41ec90
call fcn.00413780
mov ecx, dword [esp + 0x10]
mov edi, eax
inc ecx
cmp edi, ebx
mov dword [esp + 0x18], edi
mov dword [esp + 0x10], ecx
je 0x40c058
jmp 0x40be83
mov edi, dword [esp + 0x18]
mov esi, dword [sym.imp.MSVCRT.dll__mbslwr]
lea ebp, [edi + 0x108]
push ebp
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
test al, 0x10
jne 0x40c023
push 0x5c
push ebp
call dword [sym.imp.MSVCRT.dll__mbsrchr]
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x40c023
push ebp
call esi
mov edx, dword [esp + 0x24]
mov esi, dword [sym.imp.MSVCRT.dll__mbsnbcmp]
push edx
lea eax, [esp + 0x238]
push ebp
push eax
call esi
add esp, 0x10
test eax, eax
je 0x40bee9
mov ecx, dword [esp + 0x1c]
lea edx, [esp + 0x12c]
push ecx
push ebp
push edx
call esi
add esp, 0xc
test eax, eax
jne 0x40c023
inc ebx
push 0x2e
push ebx
call dword [sym.imp.MSVCRT.dll__mbschr]
mov esi, eax
add esp, 8
test esi, esi
je 0x40c023
push 0x41a424
push esi
call dword [sym.imp.MSVCRT.dll__mbscmp]
add esp, 8
test eax, eax
jne 0x40c023
add edi, 4
push ebx
push edi
mov byte [esi], al
call dword [sym.imp.MSVCRT.dll__mbsicmp]
add esp, 8
mov byte [esi], 0x2e
test eax, eax
jne 0x40c023
lea eax, [esp + 0x12c]
push edi
push eax
push str._s_s.dll
lea ecx, [esp + 0x34]
push 0x104
push ecx
call fcn.00406680
mov esi, dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
add esp, 0x14
lea edx, [esp + 0x28]
push edx
call esi
test al, 0x10
je 0x40bf92
lea eax, [esp + 0x230]
push edi
push eax
push str._s_s.dll
lea ecx, [esp + 0x34]
push 0x104
push ecx
call fcn.00406680
add esp, 0x14
lea edx, [esp + 0x28]
push edx
call esi
test al, 0x10
jne 0x40c023
push ebp
call fcn.004085e0
add esp, 4
test eax, eax
je 0x40c023
lea eax, [esp + 0x24]
push eax
push ebp
call sub.VERSION.dll_GetFileVersionInfoSizeA
test eax, eax
jne 0x40bfe1
mov esi, dword [esp + 0x338]
mov dword [esp + 0x14], 1
test esi, esi
je 0x40bfe8
push ebp
call fcn.004086c0
mov ecx, dword [esp + 0x1c]
add esp, 4
push 0
push ecx
mov ecx, 0x41ec90
call fcn.00412c10
jmp 0x40bfe8
mov esi, dword [esp + 0x338]
lea edx, [esp + 0x24]
lea eax, [esp + 0x28]
push edx
push eax
call sub.VERSION.dll_GetFileVersionInfoSizeA
test eax, eax
jne 0x40c017
mov eax, 1
test esi, esi
mov dword [esp + 0x14], eax
je 0x40c05a
lea ecx, [esp + 0x28]
push ecx
call fcn.004086c0
add esp, 4
jmp 0x40c01f
mov eax, dword [esp + 0x14]
test eax, eax
je 0x40c023
test esi, esi
je 0x40c049
lea edx, [esp + 0x10]
mov ecx, 0x41ec90
push edx
push 1
call fcn.00413780
mov edx, dword [esp + 0x10]
mov dword [esp + 0x18], eax
inc edx
test eax, eax
mov dword [esp + 0x10], edx
jne 0x40be79
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x324
ret
mov eax, ebx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x324
ret