Function at 0x416650
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1010
call fcn.004ebe60
mov eax, dword [0x515040]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, ecx
push esi
mov dword [ebp - 0x100c], ebx
mov eax, dword [ebx]
mov dword [0x576fb4], eax
call fcn.00412fe0
or dword [0x576fc0], 1
call dword [sym.imp.COMCTL32.dll_InitCommonControls]
mov esi, dword [sym.imp.USER32.dll_SystemParametersInfoA]
push 0
push 0x576f8c
push 8
push 0x3a
mov dword [0x576f8c], 8
call esi
push 0
push 0x576f94
push 8
push 0x34
mov dword [0x576f94], 8
call esi
push 0
push 0x576f9c
push 0x18
push 0x32
mov dword [0x576f9c], 0x18
call esi
push 0x105
lea eax, [ebp - 0x110]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x416732
push str.winmm.dll
lea eax, [ebp - 0x110]
push 0x104
push eax
call fcn.004d9723
add esp, 0xc
lea eax, [ebp - 0x110]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, eax
test esi, esi
je 0x416732
push str.timeBeginPeriod
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x41672b
push 1
call eax
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push 0x2b
push 0x20
call dword [sym.imp.d3dx9_43.dll_D3DXCheckVersion]
test eax, eax
jne 0x416789
call fcn.00412e50
push 0x80040909
lea eax, [ebp - 0x1008]
push str.HR:__d
push eax
call fcn.00417540
add esp, 0xc
lea eax, [ebp - 0x1008]
push 0
push str.error
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
mov eax, 0x80040909
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004cf01b
mov esp, ebp
pop ebp
ret
cmp dword [0x576f00], 0
jne 0x4168a3
push 0x105
lea eax, [ebp - 0x110]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x416851
mov ecx, 0x104
lea eax, [ebp - 0x110]
nop dword [eax + eax]
cmp byte [eax], 0
je 0x4167cb
inc eax
sub ecx, 1
jne 0x4167c0
mov edx, 0x104
mov esi, ecx
mov eax, edx
sub eax, ecx
neg esi
sbb esi, esi
and esi, eax
test ecx, ecx
je 0x416825
lea ecx, [ebp - 0x110]
lea ecx, [ecx + esi]
sub edx, esi
je 0x41681a
mov esi, str.d3d9.dll
mov eax, bind
sub esi, ecx
nop dword [eax]
test eax, eax
je 0x416814
mov bl, byte [esi + ecx]
test bl, bl
je 0x416814
mov byte [ecx], bl
dec eax
inc ecx
sub edx, 1
jne 0x416800
mov ebx, dword [ebp - 0x100c]
test edx, edx
lea eax, [ecx - 1]
cmovne eax, ecx
mov byte [eax], 0
lea eax, [ebp - 0x110]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
test eax, eax
je 0x416851
push str.Direct3DCreate9
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x416851
push 0x20
call eax
mov dword [0x576f00], eax
jmp 0x416856
mov eax, dword [0x576f00]
test eax, eax
jne 0x4168a3
call fcn.00412e50
push 0x80040901
lea eax, [ebp - 0x1008]
push str.HR:__d
push eax
call fcn.00417540
add esp, 0xc
lea eax, [ebp - 0x1008]
push 0
push str.error
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
mov eax, 0x80040901
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004cf01b
mov esp, ebp
pop ebp
ret
call fcn.00412de0
mov ecx, eax
call fcn.00416f40
or dword [0x576fc0], 2
mov ecx, dword [ebx + 4]
call fcn.00416260
test eax, eax
js 0x4168c9
mov ecx, ebx
call fcn.00416490
mov ecx, dword [ebp - 4]
pop esi
xor ecx, ebp
pop ebx
call fcn.004cf01b
mov esp, ebp
pop ebp
ret