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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x456520
mov eax, dword fs:[0]
push eax
sub esp, 0x284
mov eax, dword [0x47306c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
sub esp, 8
lea ecx, [ebp - 0x250]
call fcn.00409910
push eax
lea eax, [ebp - 0x258]
push eax
call fcn.00422e96
add esp, 8
mov dword [ebp - 4], 0
mov ecx, dword [ebp - 0x254]
test ecx, ecx
je 0x412cce
mov eax, dword [ecx]
call dword [eax + 8]
test eax, eax
je 0x412cce
mov edx, dword [eax]
mov ecx, eax
push 1
call dword [edx]
mov dword [ebp - 4], 1
mov ecx, dword [ebp - 0x24c]
test ecx, ecx
je 0x412cf0
mov eax, dword [ecx]
call dword [eax + 8]
test eax, eax
je 0x412cf0
mov edx, dword [eax]
mov ecx, eax
push 1
call dword [edx]
push 0
lea eax, [ebp - 0x274]
mov dword [ebp - 4], 0xffffffff
push eax
lea eax, [ebp - 0x25c]
mov dword [ebp - 0x274], 1
push eax
mov dword [ebp - 0x270], 0
mov dword [ebp - 0x26c], 0
mov dword [ebp - 0x268], 0
call dword [sym.imp.gdiplus.dll_GdiplusStartup]
lea eax, [ebp - 0x264]
mov dword [ebp - 0x264], 8
push eax
mov dword [ebp - 0x260], 0xff
call dword [sym.imp.COMCTL32.dll_InitCommonControlsEx]
push 0x467d6c
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x412ea7
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.00436d50
add esp, 0xc
lea eax, [ebp - 0x218]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
je 0x412ea7
xor eax, eax
mov dword [ebp - 0x220], 0
lea ecx, [ebp - 0x218]
mov dword [ebp - 0x21c], 7
mov word [ebp - 0x230], ax
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x412dc0
sub ecx, edx
lea eax, [ebp - 0x218]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x230]
call fcn.00409b10
push str.winmm.dll
lea edx, [ebp - 0x230]
lea ecx, [ebp - 0x248]
call fcn.00405da0
add esp, 4
cmp dword [eax + 0x14], 8
jb 0x412e03
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov edx, dword [ebp - 0x234]
cmp edx, 8
jb 0x412e4a
mov ecx, dword [ebp - 0x248]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x412e40
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x41309c
push edx
push ecx
call fcn.0043507c
add esp, 8
mov edx, dword [ebp - 0x21c]
xor eax, eax
mov dword [ebp - 0x238], 0
mov dword [ebp - 0x234], 7
mov word [ebp - 0x248], ax
cmp edx, 8
jb 0x412ea7
mov ecx, dword [ebp - 0x230]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x412e9d
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4130a1
push edx
push ecx
call fcn.0043507c
add esp, 8
push 0xc
call fcn.0043508a
mov ecx, dword [ebp + 8]
mov edi, eax
add esp, 4
mov dword [ebp - 0x254], edi
mov dword [edi + 4], 0
mov dword [edi + 8], 0
mov dword [edi], ecx
call fcn.0040acc0
test al, al
je 0x41303d
push 0x2a8
call fcn.0043508a
mov esi, eax
add esp, 4
mov dword [esi], vtable.TrMainWindow.0
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0
mov dword [esi + 0x18], 0
push 0
mov dword [esi + 4], str.FLiNGs_Trainer
mov dword [esi + 8], str.FLiNGTrainerMainWnd
mov byte [esi + 0x30], 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
lea ecx, [esi + 0x74]
mov dword [esi + 0x20], eax
mov dword [esi + 0xc], 0
mov byte [esi + 0x31], 0
mov dword [esi + 0x38], 0xffffffff
mov dword [esi + 0x34], 0xffffffff
mov byte [esi + 0x3c], 0
mov dword [esi + 0x1c], 0
mov dword [esi], vtable.TrWindow_Main.0
call fcn.00418c10
mov dword [esi + 0x298], 0
xor eax, eax
mov dword [esi + 0x29c], 7
mov ecx, esi
mov word [esi + 0x288], ax
mov dword [esi + 0x2a4], eax
mov dword [esi + 0x54], eax
mov dword [esi + 0x50], eax
mov dword [esi + 0x4c], eax
mov dword [esi + 0x48], eax
mov dword [esi + 0x44], eax
mov dword [esi + 0x40], eax
mov dword [esi + 0x5c], eax
mov dword [esi + 0x58], eax
mov dword [esi + 0x68], eax
mov dword [esi + 0x64], eax
mov word [esi + 0x2a0], 0x101
mov dword [edi + 4], esi
mov eax, dword [esi]
push 0x467500
push 0x97
mov eax, dword [eax]
call eax
test al, al
je 0x41303d
mov ecx, dword [edi + 4]
call fcn.0041e9a0
push 0x6d
push dword [edi]
call dword [sym.imp.USER32.dll_LoadAcceleratorsW]
mov esi, dword [sym.imp.USER32.dll_GetMessageW]
push 0
push 0
mov dword [ebp - 0x24c], eax
lea eax, [ebp - 0x290]
push 0
push eax
call esi
test eax, eax
je 0x41303d
mov ebx, dword [sym.imp.USER32.dll_TranslateMessage]
mov edi, dword [ebp - 0x24c]
lea eax, [ebp - 0x290]
push eax
push edi
push dword [ebp - 0x290]
call dword [sym.imp.USER32.dll_TranslateAcceleratorW]
test eax, eax
jne 0x413024
lea eax, [ebp - 0x290]
push eax
call ebx
lea eax, [ebp - 0x290]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageW]
push 0
push 0
push 0
lea eax, [ebp - 0x290]
push eax
call esi
test eax, eax
jne 0x412ff6
mov edi, dword [ebp - 0x254]
mov ecx, dword [edi + 4]
test ecx, ecx
je 0x41304a
push ecx
call fcn.0040a6d0
mov esi, dword [edi + 8]
test esi, esi
je 0x413065
push dword [esi + 0xc]
call dword [sym.imp.GDI32.dll_DeleteObject]
push 0x18
push esi
call fcn.0043507c
add esp, 8
push 0xc
push edi
call fcn.0043507c
add esp, 8
push dword [ebp - 0x25c]
call dword [sym.imp.gdiplus.dll_GdiplusShutdown]
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0043506b
mov esp, ebp
pop ebp
ret 0x10
call fcn.00439e03
call fcn.00439e03
int3