Function at 0x412d20
Capabilities:
Check if file exists
Get common file path

Disassembly:
push 0xffffffffffffffff
push 0x568ea5
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x228
mov eax, dword [esp + 0x238]
push ebx
push ebp
push esi
push edi
push eax
lea ecx, [esp + 0x18]
call fcn.004c4300
lea ecx, [esp + 0x14]
mov dword [esp + 0x240], 0
push ecx
mov ecx, dword [0x5fcd0c]
push 0
call fcn.004c3ab0
mov esi, eax
test esi, esi
je 0x413089
cmp dword [esi + 8], 1
jne 0x413089
mov edx, dword [esi + 4]
mov eax, dword [edx + 4]
test eax, eax
je 0x413089
mov eax, dword [esi + 0xc]
lea ecx, [esp + 0x134]
mov eax, dword [eax + 4]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea edx, [esp + 0x134]
push 0x3a
push edx
call dword [sym.imp.SHLWAPI.dll_StrChrA]
test eax, eax
je 0x412dd6
lea ecx, [esp + 0x14]
mov dword [esp + 0x240], 0xffffffff
call fcn.004c44b0
mov eax, 1
jmp 0x41309f
lea eax, [esp + 0x30]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
mov al, byte [esp + 0x134]
mov ebx, dword [sym.imp.SHLWAPI.dll_PathAddBackslashA]
cmp al, 0x2f
je 0x412e02
cmp al, 0x5c
je 0x412e02
lea ecx, [esp + 0x30]
push ecx
call ebx
mov edi, dword [sym.imp.KERNEL32.dll_lstrcatA]
lea edx, [esp + 0x134]
lea eax, [esp + 0x30]
push edx
push eax
call edi
mov ebp, dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
lea ecx, [esp + 0x30]
push ecx
call ebp
test eax, eax
je 0x412e46
lea ecx, [esp + 0x14]
mov dword [esp + 0x240], 0xffffffff
call fcn.004c44b0
mov eax, 1
jmp 0x41309f
lea edx, [esp + 0x30]
push 0x104
push edx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
lea eax, [esp + 0x30]
push eax
call ebx
lea ecx, [esp + 0x30]
push 0x5bb2b4
push ecx
call edi
mov edx, dword [esp + 0x24c]
lea eax, [esp + 0x30]
push edx
push eax
call edi
lea ecx, [esp + 0x30]
push 0x5bb2ac
push ecx
call edi
lea edx, [esp + 0x30]
push edx
call ebp
test eax, eax
je 0x412f80
lea eax, [esp + 0x30]
lea ecx, [esp + 0x20]
push eax
call fcn.004c4300
push 0x10
mov byte [esp + 0x244], 1
call fcn.0055d252
mov edi, eax
add esp, 4
mov dword [esp + 0x1c], edi
mov bl, 2
test edi, edi
mov byte [esp + 0x240], bl
je 0x412f06
mov ebp, dword [esi + 4]
push 8
call fcn.0055d252
add esp, 4
mov dword [esp + 0x10], eax
test eax, eax
mov byte [esp + 0x240], 3
je 0x412eed
push ebp
mov ecx, eax
call fcn.004c4450
jmp 0x412eef
xor eax, eax
mov ecx, dword [esi + 8]
mov byte [esp + 0x240], bl
push ecx
push eax
mov ecx, edi
call fcn.004be2d0
mov esi, eax
jmp 0x412f08
xor esi, esi
push 8
mov byte [esp + 0x244], 1
call fcn.0055d252
add esp, 4
mov dword [esp + 0x10], eax
test eax, eax
mov byte [esp + 0x240], 4
je 0x412f38
lea edx, [esp + 0x20]
mov ecx, eax
push edx
call fcn.004c4450
jmp 0x412f3a
xor eax, eax
mov dword [esi + 0xc], eax
mov ecx, dword [0x5fcd0c]
push esi
mov byte [esp + 0x244], 1
call fcn.004c4280
lea ecx, [esp + 0x20]
mov byte [esp + 0x240], 0
call fcn.004c44b0
lea ecx, [esp + 0x14]
mov dword [esp + 0x240], 0xffffffff
call fcn.004c44b0
mov eax, 1
jmp 0x41309f
lea eax, [esp + 0x30]
push 0x5bb2a4
push eax
call dword [sym.imp.SHLWAPI.dll_PathRenameExtensionA]
lea ecx, [esp + 0x30]
push ecx
call ebp
test eax, eax
je 0x413089
lea edx, [esp + 0x30]
lea ecx, [esp + 0x28]
push edx
call fcn.004c4300
push 0x10
mov byte [esp + 0x244], 5
call fcn.0055d252
mov edi, eax
add esp, 4
mov dword [esp + 0x10], edi
mov bl, 6
test edi, edi
mov byte [esp + 0x240], bl
je 0x413012
mov ebp, dword [esi + 4]
push 8
call fcn.0055d252
add esp, 4
mov dword [esp + 0x1c], eax
test eax, eax
mov byte [esp + 0x240], 7
je 0x412ff9
push ebp
mov ecx, eax
call fcn.004c4450
jmp 0x412ffb
xor eax, eax
mov ecx, dword [esi + 8]
mov byte [esp + 0x240], bl
push ecx
push eax
mov ecx, edi
call fcn.004be2d0
mov esi, eax
jmp 0x413014
xor esi, esi
push 8
mov byte [esp + 0x244], 5
call fcn.0055d252
add esp, 4
mov dword [esp + 0x10], eax
test eax, eax
mov byte [esp + 0x240], 8
je 0x413044
lea edx, [esp + 0x28]
mov ecx, eax
push edx
call fcn.004c4450
jmp 0x413046
xor eax, eax
mov dword [esi + 0xc], eax
mov ecx, dword [0x5fcd0c]
push esi
mov byte [esp + 0x244], 5
call fcn.004c4280
lea ecx, [esp + 0x28]
mov byte [esp + 0x240], 0
call fcn.004c44b0
lea ecx, [esp + 0x14]
mov dword [esp + 0x240], 0xffffffff
call fcn.004c44b0
mov eax, 1
jmp 0x41309f
lea ecx, [esp + 0x14]
mov dword [esp + 0x240], 0xffffffff
call fcn.004c44b0
xor eax, eax
mov ecx, dword [esp + 0x238]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x234
ret