Function at 0x407250
Capabilities:
Check if file exists
Get common file path
Get file attributes
Get startup folder
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x461b5f
mov eax, dword fs:[0]
push eax
sub esp, 0x8c
push ebx
push ebp
push esi
push edi
mov eax, dword [0x47c748]
xor eax, esp
push eax
lea eax, [esp + 0xa0]
mov dword fs:[0], eax
mov ebp, ecx
call fcn.0041a9e7
mov eax, dword [ebp + 0x114]
mov edi, dword [sym.imp.USER32.dll_SendMessageW]
push eax
mov eax, dword [ebp + 0x20]
push 1
push 0x80
push eax
call edi
mov eax, dword [ebp + 0x114]
mov ecx, dword [ebp + 0x20]
push eax
xor esi, esi
push esi
push 0x80
push ecx
call edi
lea ecx, [esp + 0x14]
call fcn.00406660
push eax
lea edx, [esp + 0x1c]
push edx
mov dword [esp + 0xb0], esi
call fcn.0044cd06
mov ebx, dword [esp + 0x20]
add esp, 8
cmp ebx, esi
je 0x40731d
push esi
lea ecx, [esp + 0x38]
call fcn.0044c9a6
mov eax, dword [ebx + 4]
cmp eax, esi
jbe 0x4072fb
cmp eax, 0xffffffff
jae 0x4072fb
add eax, 0xffffffff
mov dword [ebx + 4], eax
mov edi, dword [ebx + 4]
neg edi
sbb edi, edi
not edi
lea ecx, [esp + 0x34]
and edi, ebx
call fcn.0044c9c7
cmp edi, esi
je 0x40731d
mov eax, dword [edi]
mov edx, dword [eax]
push 1
mov ecx, edi
call edx
mov dword [esp + 0xa8], 0xffffffff
mov ebx, dword [esp + 0x14]
cmp ebx, esi
je 0x40736e
push esi
lea ecx, [esp + 0x38]
call fcn.0044c9a6
mov eax, dword [ebx + 4]
cmp eax, esi
jbe 0x40734c
cmp eax, 0xffffffff
jae 0x40734c
add eax, 0xffffffff
mov dword [ebx + 4], eax
mov edi, dword [ebx + 4]
neg edi
sbb edi, edi
not edi
lea ecx, [esp + 0x34]
and edi, ebx
call fcn.0044c9c7
cmp edi, esi
je 0x40736e
mov eax, dword [edi]
mov edx, dword [eax]
push 1
mov ecx, edi
call edx
mov eax, dword [ebp + 0x20]
push eax
mov dword [ebp + 0x78], esi
mov dword [ebp + 0x84], esi
mov dword [ebp + 0x88], 3
mov dword [ebp + 0x8c], 4
mov dword [ebp + 0x90], 5
call dword [sym.imp.USER32.dll_GetDC]
push eax
call fcn.0041cb52
push 0x30303
mov dword [0x481bb8], eax
call dword [sym.imp.GDI32.dll_CreateSolidBrush]
push eax
mov ecx, 0x47e4b4
call fcn.0041ce27
push 0x46b8c8
mov ecx, ebp
call fcn.0041d1bf
mov edi, dword [sym.imp.USER32.dll_GetSystemMetrics]
push 1
push 0x15e
push 0x244
push 1
call edi
cdq
sub eax, edx
sar eax, 1
sub eax, 0xaf
push eax
push esi
call edi
cdq
sub eax, edx
sar eax, 1
sub eax, 0x122
push eax
mov ecx, ebp
call fcn.0041d21b
mov dword [esp + 0x44], esi
mov dword [esp + 0x40], vtable.CRgn.0
lea ecx, [esp + 0x4c]
mov dword [esp + 0xa8], 1
mov edx, dword [ebp + 0x20]
push ecx
push edx
call dword [sym.imp.USER32.dll_GetWindowRect]
mov eax, dword [esp + 0x54]
sub eax, dword [esp + 0x4c]
push 1
lea ecx, [eax - 6]
mov dword [esp + 0x70], eax
mov dword [esp + 0x78], eax
mov eax, dword [esp + 0x5c]
sub eax, dword [esp + 0x54]
mov edi, 6
lea edx, [eax - 6]
mov dword [esp + 0x84], eax
mov dword [esp + 0x8c], eax
push 8
lea eax, [esp + 0x64]
push eax
mov dword [esp + 0x68], edi
mov dword [esp + 0x6c], esi
mov dword [esp + 0x70], ecx
mov dword [esp + 0x74], esi
mov dword [esp + 0x7c], edi
mov dword [esp + 0x84], edx
mov dword [esp + 0x88], ecx
mov dword [esp + 0x90], edi
mov dword [esp + 0x98], esi
mov dword [esp + 0x9c], edx
mov dword [esp + 0xa0], esi
mov dword [esp + 0xa4], edi
call dword [sym.imp.GDI32.dll_CreatePolygonRgn]
push eax
lea ecx, [esp + 0x44]
call fcn.0041ce27
mov ecx, dword [esp + 0x44]
push 1
mov edx, dword [ebp + 0x20]
push ecx
push edx
call dword [sym.imp.USER32.dll_SetWindowRgn]
lea ecx, [esp + 0x40]
call fcn.0041ce50
push ebp
call fcn.00408b90
mov eax, dword [0x481bc0]
mov edx, dword [eax + 4]
push 0xff000000
lea ecx, [ebp + 0x110]
push ecx
push edx
mov edi, eax
call sub.gdiplus.dll_GdipCreateHBITMAPFromBitmap
cmp eax, esi
je 0x4074fa
mov dword [edi + 8], eax
lea eax, [ebp + 0x118]
lea ecx, [eax + 0x74]
push ecx
push 0x81
push eax
mov dword [ebp + 0x7c], 0
call fcn.00418570
lea esi, [ebp + 0x21c]
lea edx, [esi + 0x74]
push edx
push 0x86
push esi
call fcn.00418570
lea edi, [ebp + 0x320]
lea eax, [edi + 0x74]
push eax
push 0x88
push edi
call fcn.00418570
lea ebx, [ebp + 0x424]
lea ecx, [ebx + 0x74]
push ecx
push 0x8c
push ebx
call fcn.00418570
lea edx, [esi + 0x70]
push edx
push 0x87
push esi
mov dword [esi + 0x54], 1
call fcn.00418570
lea eax, [edi + 0x70]
push eax
push 0x89
push edi
mov dword [edi + 0x54], 1
call fcn.00418570
lea ecx, [ebx + 0x70]
push ecx
push 0x9a
push ebx
mov dword [ebx + 0x54], 1
call fcn.00418570
lea eax, [ebp + 0x62c]
lea edx, [eax + 0x74]
push edx
push 0x95
push eax
call fcn.00418570
lea eax, [ebp + 0x528]
lea ecx, [eax + 0x74]
push ecx
push 0x93
push eax
call fcn.00418570
lea eax, [ebp + 0x62c]
lea edx, [eax + 0x70]
push edx
push 0x96
push eax
mov dword [eax + 0x54], 1
call fcn.00418570
lea eax, [ebp + 0x528]
lea ecx, [eax + 0x70]
push ecx
push 0x94
push eax
mov dword [eax + 0x54], 1
call fcn.00418570
mov ecx, dword [ebp + 0x7a8]
test ecx, ecx
lea eax, [ebp + 0x7a8]
mov dword [esp + 0x18], eax
je 0x407615
mov edx, dword [ecx]
mov eax, dword [edx]
push 1
call eax
mov ecx, dword [esp + 0x18]
push ecx
push 0x97
lea eax, [ebp + 0x730]
push eax
call fcn.00418570
cmp dword [ebp + 0x784], 0
jne 0x407640
mov edx, dword [esp + 0x18]
mov eax, dword [edx]
mov dword [ebp + 0x784], eax
mov ecx, dword [ebp + 0x7ac]
test ecx, ecx
lea eax, [ebp + 0x7ac]
mov dword [esp + 0x14], eax
je 0x40765c
mov edx, dword [ecx]
mov eax, dword [edx]
push 1
call eax
mov ecx, dword [esp + 0x14]
push ecx
push 0x98
lea eax, [ebp + 0x730]
push eax
call fcn.00418570
cmp dword [ebp + 0x784], 0
jne 0x407687
mov edx, dword [ebp + 0x7a8]
mov dword [ebp + 0x784], edx
mov ecx, dword [ebp + 0x7b0]
test ecx, ecx
lea eax, [ebp + 0x7b0]
mov dword [esp + 0x14], eax
je 0x4076a3
mov eax, dword [ecx]
mov edx, dword [eax]
push 1
call edx
mov eax, dword [esp + 0x14]
push eax
push 0x99
lea eax, [ebp + 0x730]
push eax
call fcn.00418570
cmp dword [ebp + 0x784], 0
jne 0x4076ce
mov ecx, dword [ebp + 0x7a8]
mov dword [ebp + 0x784], ecx
mov ecx, dword [ebp + 0x844]
test ecx, ecx
lea eax, [ebp + 0x844]
mov dword [esp + 0x18], eax
je 0x4076ea
mov edx, dword [ecx]
mov eax, dword [edx]
push 1
call eax
mov ecx, dword [esp + 0x18]
push ecx
push 0x90
lea eax, [ebp + 0x7cc]
push eax
call fcn.00418570
cmp dword [ebp + 0x820], 0
jne 0x407715
mov edx, dword [esp + 0x18]
mov eax, dword [edx]
mov dword [ebp + 0x820], eax
mov ecx, dword [ebp + 0x848]
test ecx, ecx
lea eax, [ebp + 0x848]
mov dword [esp + 0x14], eax
je 0x407731
mov edx, dword [ecx]
mov eax, dword [edx]
push 1
call eax
mov ecx, dword [esp + 0x14]
push ecx
push 0x91
lea eax, [ebp + 0x7cc]
push eax
call fcn.00418570
cmp dword [ebp + 0x820], 0
jne 0x40775c
mov edx, dword [ebp + 0x844]
mov dword [ebp + 0x820], edx
mov ecx, dword [ebp + 0x84c]
test ecx, ecx
lea eax, [ebp + 0x84c]
mov dword [esp + 0x14], eax
je 0x407778
mov eax, dword [ecx]
mov edx, dword [eax]
push 1
call edx
mov eax, dword [esp + 0x14]
push eax
push 0x92
lea eax, [ebp + 0x7cc]
push eax
call fcn.00418570
cmp dword [ebp + 0x820], 0
jne 0x4077a3
mov ecx, dword [ebp + 0x844]
mov dword [ebp + 0x820], ecx
cmp dword [esi + 0x54], 0
mov eax, 1
je 0x4077bd
lea edx, [esi + 0xc0]
mov dword [esi + 0x60], eax
mov dword [esi + 0x100], edx
cmp dword [edi + 0x54], 0
je 0x4077d2
lea ecx, [edi + 0xc0]
mov dword [edi + 0x60], eax
mov dword [edi + 0x100], ecx
cmp dword [ebx + 0x54], 0
je 0x4077e7
lea edx, [ebx + 0xc0]
mov dword [ebx + 0x60], eax
mov dword [ebx + 0x100], edx
cmp dword [ebp + 0x680], 0
je 0x407802
lea ecx, [ebp + 0x6ec]
mov dword [ebp + 0x68c], eax
mov dword [ebp + 0x72c], ecx
cmp dword [ebp + 0x57c], 0
je 0x40781d
lea edx, [ebp + 0x5e8]
mov dword [ebp + 0x588], eax
mov dword [ebp + 0x628], edx
push 1
push 0x19
push 0x183
push 7
push 4
lea ecx, [ebp + 0x730]
call fcn.0041d21b
push 1
push 0x1a
push 0x27
push 5
push 0x190
mov ecx, esi
call fcn.0041d21b
push 1
push 0x1a
push 0x27
push 5
push 0x1bb
mov ecx, edi
call fcn.0041d21b
push 1
push 0x1a
push 0x45
push 5
push 0x1e5
mov ecx, ebx
call fcn.0041d21b
push 1
push 0x1a
push 0x18
push 5
push 0x22a
lea ecx, [ebp + 0x118]
call fcn.0041d21b
push 1
push 0x1f
push 0x30
push 0x13b
push 0x1ec
lea ecx, [ebp + 0x528]
call fcn.0041d21b
push 1
push 0x1f
push 0x20
push 0x13b
push 0x21f
lea ecx, [ebp + 0x62c]
call fcn.0041d21b
push 1
push 0x104
push 0x161
push 0x2e
push 0xdd
lea ecx, [ebp + 0x7cc]
call fcn.0041d21b
push 0x481bd0
push 0
push 0
push 5
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
mov eax, 0x481bd0
lea ecx, [eax + 2]
jmp 0x407900
mov dx, word [eax]
add eax, 2
test dx, dx
jne 0x407900
sub eax, ecx
sar eax, 1
push eax
push 0x481bd0
mov ecx, 0x48275c
call fcn.0040a600
push 0xd
push str.FLiNGTrainer
mov ecx, 0x48275c
call fcn.00409fc0
mov eax, dword [0x48275c]
add eax, 0xfffffff0
push eax
call fcn.0040a710
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
add esp, 4
lea esi, [eax + 0x10]
push esi
call edi
xor ebx, ebx
cmp eax, 0xffffffff
setne bl
add esi, 0xfffffff0
lea eax, [esi + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x407971
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
test ebx, ebx
jne 0x407984
mov ecx, dword [0x48275c]
push ecx
call fcn.00433d6d
add esp, 4
push str.TrainerSettings.ini
lea edx, [esp + 0x18]
push 0x48275c
push edx
call fcn.00409c10
add esp, 0xc
lea ebx, [ebp + 0xa8]
push eax
mov ecx, ebx
mov byte [esp + 0xac], 2
call fcn.0040a580
mov byte [esp + 0xa8], 1
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4079d9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebx]
sub eax, 0x10
push eax
call fcn.0040a710
add esp, 4
lea esi, [eax + 0x10]
push esi
call edi
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
lea eax, [esi - 0x10]
lea edx, [eax + 0xc]
mov edi, ecx
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x407a13
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test edi, edi
mov esi, dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
jne 0x407b3b
push 0x46b19f
push 2
call fcn.00434c7d
add esp, 8
push eax
lea ecx, [esp + 0x1c]
call fcn.0040a950
mov byte [esp + 0xa8], 3
mov eax, dword [esp + 0x18]
cmp dword [eax - 0xc], 0
jl 0x407ab0
push str.Chinese
push eax
call fcn.00434ded
add esp, 8
test eax, eax
je 0x407ab0
mov ecx, dword [esp + 0x18]
sub eax, ecx
sar eax, 1
cmp eax, 0xffffffff
je 0x407ab0
cmp dword [ecx - 0xc], 0
jl 0x407a9f
push str.Traditional
push ecx
call fcn.00434ded
add esp, 8
test eax, eax
je 0x407a9f
sub eax, dword [esp + 0x18]
sar eax, 1
cmp eax, 0xffffffff
je 0x407a9f
push str.Chinese_Traditional
mov ecx, 0x482760
call fcn.0040a780
jmp 0x407ac1
push str.Chinese_Simplified
mov ecx, 0x482760
call fcn.0040a780
jmp 0x407ac1
push 7
push str.English
mov ecx, 0x482760
call fcn.0040a600
mov eax, dword [ebx]
mov ecx, dword [0x482760]
push eax
push ecx
push str.Language
push str.Trainer
call esi
mov eax, dword [ebx]
push eax
push str.True
push str.ShowAVHint
push str.Trainer
call esi
mov eax, dword [ebx]
push eax
push str.True
push str.OnLoadMusic
push str.Trainer
call esi
mov eax, dword [ebx]
push eax
push str.False
push str.IgnoreGameVersion
push str.Trainer
call esi
mov byte [esp + 0xa8], 1
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x407b3b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push ecx
mov ecx, esp
mov dword [esp + 0x34], esp
push str.Error
call fcn.0040aca0
mov byte [esp + 0xac], 4
mov eax, dword [ebx]
push ecx
sub eax, 0x10
mov dword [esp + 0x40], esp
mov edi, esp
push eax
call fcn.0040a710
add eax, 0x10
mov dword [edi], eax
mov byte [esp + 0xb4], 5
mov ecx, esp
mov dword [esp + 0x48], esp
push str.ShowAVHint
call fcn.0040aca0
push ecx
mov byte [esp + 0xb8], 6
mov ecx, esp
mov dword [esp + 0x24], esp
push str.Trainer
call fcn.0040aca0
lea edi, [esp + 0x2c]
mov byte [esp + 0xb8], 1
call fcn.00408dd0
mov byte [esp + 0xa8], 7
mov edi, dword [esp + 0x1c]
mov ecx, str.Error
mov eax, edi
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x407be6
test dx, dx
je 0x407be2
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x407be6
add eax, 4
add ecx, 4
test dx, dx
jne 0x407bc0
xor eax, eax
jmp 0x407beb
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
sete al
test al, al
je 0x407cbc
mov eax, dword [ebx]
push eax
push str.True
push str.ShowAVHint
push str.Trainer
call esi
push ecx
mov ecx, esp
mov dword [esp + 0x34], esp
push str.Error
call fcn.0040aca0
mov byte [esp + 0xac], 8
mov eax, dword [ebx]
push ecx
sub eax, 0x10
mov dword [esp + 0x40], esp
mov esi, esp
push eax
call fcn.0040a710
add eax, 0x10
mov dword [esi], eax
mov byte [esp + 0xb4], 9
mov ecx, esp
mov dword [esp + 0x48], esp
push str.ShowAVHint
call fcn.0040aca0
push ecx
mov byte [esp + 0xb8], 0xa
mov ecx, esp
mov dword [esp + 0x44], esp
push str.Trainer
call fcn.0040aca0
lea edi, [esp + 0x24]
mov byte [esp + 0xb8], 7
call fcn.00408dd0
push eax
lea ecx, [esp + 0x20]
mov byte [esp + 0xac], 0xb
call fcn.0040a580
mov byte [esp + 0xa8], 7
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x407cb8
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edi, dword [esp + 0x1c]
mov esi, dword [edi - 0xc]
mov eax, dword [edi - 8]
mov ecx, 1
sub ecx, dword [edi - 4]
sub eax, esi
or eax, ecx
jge 0x407cde
push esi
lea ecx, [esp + 0x20]
call fcn.0040a470
mov edi, dword [esp + 0x1c]
lea ecx, [esi + 1]
push ecx
push edi
call fcn.004350a3
add esp, 8
test esi, esi
jl 0x408573
mov eax, dword [esp + 0x1c]
cmp esi, dword [eax - 8]
jg 0x408573
mov dword [eax - 0xc], esi
mov edx, dword [esp + 0x1c]
lea eax, [esp + 0x1c]
push eax
mov ecx, eax
mov word [edx + esi*2], 0
call fcn.0040a580
mov ecx, dword [esp + 0x1c]
mov eax, dword [ecx - 0xc]
test eax, eax
jl 0x407d45
push str.FALSE
push ecx
call fcn.00434ded
add esp, 8
test eax, eax
je 0x407d45
sub eax, dword [esp + 0x1c]
sar eax, 1
cmp eax, 0xffffffff
jne 0x407ea7
push 0x46ba70
lea ecx, [esp + 0x1c]
call fcn.0040aca0
push ecx
mov byte [esp + 0xac], 0xc
mov ecx, esp
mov dword [esp + 0x34], esp
push str.360Tray
call fcn.0040aca0
call fcn.0040dfc0
test eax, eax
je 0x407d85
push 7
push str.360Tray
lea ecx, [esp + 0x20]
call fcn.0040a600
push ecx
mov ecx, esp
mov dword [esp + 0x34], esp
push str.360Safe
call fcn.0040aca0
call fcn.0040dfc0
test eax, eax
je 0x407daf
push 7
push str.360Safe
lea ecx, [esp + 0x20]
call fcn.0040a600
lea ecx, [esp + 0x18]
push 0x46ba70
push ecx
call fcn.00409de0
add esp, 8
test al, al
je 0x407e7f
lea edx, [esp + 0x34]
push 0x46bba0
push edx
lea ecx, [esp + 0x20]
call fcn.00409cf0
push 0x46bab0
push eax
lea eax, [esp + 0x24]
push eax
mov byte [esp + 0xbc], 0xd
call fcn.00409c10
add esp, 0x14
push 4
mov byte [esp + 0xac], 0xe
mov eax, dword [eax]
push str.Fuck360
push eax
mov ecx, ebp
call fcn.0041efe2
cmp eax, 7
mov byte [esp + 0xa8], 0xd
mov eax, dword [esp + 0x14]
sete byte [esp + 0x2f]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x407e40
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0xa8], 0xc
mov eax, dword [esp + 0x34]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x407e68
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp byte [esp + 0x2f], 0
je 0x407e7f
mov ecx, dword [ebp + 0x20]
push 0
push 0
push 0x10
push ecx
call dword [sym.imp.USER32.dll_SendMessageW]
mov byte [esp + 0xa8], 7
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x407ea7
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push ecx
mov ecx, esp
mov dword [esp + 0x34], esp
push str.Error
call fcn.0040aca0
mov byte [esp + 0xac], 0xf
mov eax, dword [ebx]
push ecx
sub eax, 0x10
mov dword [esp + 0x40], esp
mov esi, esp
push eax
call fcn.0040a710
add eax, 0x10
mov dword [esi], eax
mov byte [esp + 0xb4], 0x10
mov ecx, esp
mov dword [esp + 0x48], esp
push str.Language
call fcn.0040aca0
push ecx
mov byte [esp + 0xb8], 0x11
mov ecx, esp
mov dword [esp + 0x24], esp
push str.Trainer
call fcn.0040aca0
lea edi, [esp + 0x30]
mov byte [esp + 0xb8], 7
call fcn.00408dd0
mov byte [esp + 0xa8], 0x12
mov edx, dword [esp + 0x20]
mov esi, dword [edx - 0xc]
mov eax, dword [edx - 8]
mov ecx, 1
sub ecx, dword [edx - 4]
sub eax, esi
or eax, ecx
jge 0x407f45
push esi
mov ecx, edi
call fcn.0040a470
mov edx, dword [esp + 0x20]
lea ecx, [esi + 1]
push ecx
push edx
call fcn.004350a3
add esp, 8
test esi, esi
jl 0x408573
mov eax, dword [esp + 0x20]
cmp esi, dword [eax - 8]
jg 0x408573
mov dword [eax - 0xc], esi
mov edx, dword [esp + 0x20]
lea eax, [esp + 0x20]
push eax
mov ecx, eax
mov word [edx + esi*2], 0
call fcn.0040a580
mov ecx, dword [esp + 0x20]
cmp dword [ecx - 0xc], 0
jl 0x407fd8
push 0x46bbc0
push ecx
call fcn.00434ded
mov ecx, dword [esp + 0x28]
add esp, 8
test eax, eax
je 0x407fb0
sub eax, ecx
sar eax, 1
cmp eax, 0xffffffff
je 0x407fb0
mov eax, 1
jmp 0x407fdd
cmp dword [ecx - 0xc], 0
jl 0x407fd8
push str.TRADITIONAL
push ecx
call fcn.00434ded
add esp, 8
test eax, eax
je 0x407fd8
sub eax, dword [esp + 0x20]
sar eax, 1
cmp eax, 0xffffffff
mov eax, 2
jne 0x407fdd
mov eax, 3
mov esi, ebp
call fcn.00408fc0
push ecx
mov ecx, esp
mov dword [esp + 0x34], esp
push str.Error
call fcn.0040aca0
mov byte [esp + 0xac], 0x13
mov eax, dword [ebx]
push ecx
sub eax, 0x10
mov dword [esp + 0x40], esp
mov esi, esp
push eax
call fcn.0040a710
add eax, 0x10
mov dword [esi], eax
mov byte [esp + 0xb4], 0x14
mov ecx, esp
mov dword [esp + 0x48], esp
push str.IgnoreGameVersion
call fcn.0040aca0
push ecx
mov byte [esp + 0xb8], 0x15
mov ecx, esp
mov dword [esp + 0x24], esp
push str.Trainer
call fcn.0040aca0
lea edi, [esp + 0x38]
mov byte [esp + 0xb8], 0x12
call fcn.00408dd0
mov byte [esp + 0xa8], 0x16
mov edx, dword [esp + 0x28]
mov esi, dword [edx - 0xc]
mov eax, dword [edx - 8]
mov ecx, 1
sub ecx, dword [edx - 4]
sub eax, esi
or eax, ecx
jge 0x408082
push esi
mov ecx, edi
call fcn.0040a470
mov edx, dword [esp + 0x28]
lea ecx, [esi + 1]
push ecx
push edx
call fcn.004350a3
add esp, 8
test esi, esi
jl 0x408573
mov eax, dword [esp + 0x28]
cmp esi, dword [eax - 8]
jg 0x408573
mov dword [eax - 0xc], esi
mov edx, dword [esp + 0x28]
lea eax, [esp + 0x28]
push eax
mov ecx, eax
mov word [edx + esi*2], 0
call fcn.0040a580
mov esi, dword [esp + 0x28]
mov ecx, str.ERROR
mov eax, esi
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x4080ee
test dx, dx
je 0x4080ea
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x4080ee
add eax, 4
add ecx, 4
test dx, dx
jne 0x4080c8
xor eax, eax
jmp 0x4080f3
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
sete al
test al, al
je 0x408118
mov eax, dword [ebx]
push eax
push str.False
push str.IgnoreGameVersion
push str.Trainer
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
mov esi, dword [esp + 0x28]
cmp dword [esi - 0xc], 0
jl 0x408147
push str.TRUE
push esi
call fcn.00434ded
add esp, 8
test eax, eax
je 0x408147
sub eax, dword [esp + 0x28]
sar eax, 1
cmp eax, 0xffffffff
je 0x408147
mov dword [ebp + 0x80], 1
jmp 0x408151
mov dword [ebp + 0x80], 0
call fcn.00408a60
test eax, eax
jne 0x408186
mov eax, dword [ebp + 0x94]
mov ecx, dword [ebp + 0xc0]
push 0x34
push eax
push ecx
mov ecx, ebp
call fcn.0041efe2
cmp eax, 6
jne 0x408186
mov ecx, dword [ebp + 0x20]
push 0
push 0
push 0x10
push ecx
call dword [sym.imp.USER32.dll_SendMessageW]
push 0x482754
lea edx, [esp + 0x18]
push 0x48275c
push edx
call fcn.00409b50
add esp, 0xc
mov byte [esp + 0xa8], 0x17
mov edx, dword [eax]
mov ecx, ebp
call fcn.00408c80
mov byte [esp + 0xa8], 0x16
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4081d6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [esp + 0x30]
push str.Open__
push ecx
mov ecx, 0x48275c
call fcn.00409cf0
push 0x482754
push eax
lea edx, [esp + 0x48]
push edx
mov byte [esp + 0xbc], 0x18
call fcn.00409b50
add esp, 0x14
push str.__type_mpegvideo_alias_media
push eax
lea eax, [esp + 0x44]
push eax
mov byte [esp + 0xb4], 0x19
call fcn.00409c10
add esp, 0xc
push eax
mov ecx, 0x482750
mov byte [esp + 0xac], 0x1a
call fcn.0040a580
mov byte [esp + 0xa8], 0x19
mov eax, dword [esp + 0x3c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40825b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0xa8], 0x18
mov eax, dword [esp + 0x38]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x408283
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0xa8], 0x16
mov eax, dword [esp + 0x30]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4082ab
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push ecx
mov ecx, esp
mov dword [esp + 0x18], esp
push str.Error
call fcn.0040aca0
mov byte [esp + 0xac], 0x1b
mov eax, dword [ebx]
push ecx
sub eax, 0x10
mov dword [esp + 0x3c], esp
mov esi, esp
push eax
call fcn.0040a710
add eax, 0x10
mov dword [esi], eax
mov byte [esp + 0xb4], 0x1c
mov ecx, esp
mov dword [esp + 0x24], esp
push str.OnLoadMusic
call fcn.0040aca0
push ecx
mov ecx, esp
mov dword [esp + 0x58], esp
push str.Trainer
mov byte [esp + 0xbc], 0x1d
call fcn.0040aca0
lea edi, [esp + 0x34]
mov byte [esp + 0xb8], 0x16
call fcn.00408dd0
mov byte [esp + 0xa8], 0x1e
mov edi, dword [esp + 0x24]
mov ecx, str.Error
mov eax, edi
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x408356
test dx, dx
je 0x408352
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x408356
add eax, 4
add ecx, 4
test dx, dx
jne 0x408330
xor eax, eax
jmp 0x40835b
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
sete al
test al, al
je 0x408390
mov ebx, dword [ebx]
push ebx
push str.True
push str.OnLoadMusic
push str.Trainer
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
push 4
push str.True
lea ecx, [esp + 0x2c]
call fcn.0040a600
mov edi, dword [esp + 0x24]
mov esi, dword [edi - 0xc]
mov eax, dword [edi - 8]
mov ecx, 1
sub ecx, dword [edi - 4]
sub eax, esi
or eax, ecx
jge 0x4083b2
push esi
lea ecx, [esp + 0x28]
call fcn.0040a470
mov edi, dword [esp + 0x24]
lea ecx, [esi + 1]
push ecx
push edi
call fcn.004350a3
add esp, 8
test esi, esi
jl 0x408573
mov eax, dword [esp + 0x24]
cmp esi, dword [eax - 8]
jg 0x408573
mov dword [eax - 0xc], esi
mov edx, dword [esp + 0x24]
lea eax, [esp + 0x24]
push eax
mov ecx, eax
mov word [edx + esi*2], 0
call fcn.0040a580
mov eax, dword [esp + 0x24]
cmp dword [eax - 0xc], 0
jl 0x408414
push str.FALSE
push eax
call fcn.00434ded
add esp, 8
test eax, eax
je 0x408414
sub eax, dword [esp + 0x24]
sar eax, 1
cmp eax, 0xffffffff
jne 0x408430
push ecx
mov esi, esp
mov dword [esp + 0x4c], esp
call fcn.0040e200
call fcn.0040dfc0
test eax, eax
jne 0x408430
mov esi, ebp
call fcn.00408d80
mov esi, ebp
call fcn.0040f7b0
mov ecx, dword [ebp + 0x20]
push 0
push ecx
mov ecx, ebp
mov dword [ebp + 0xf4], 0
call fcn.00408f20
mov edx, dword [ebp + 0x20]
mov esi, dword [sym.imp.USER32.dll_SetTimer]
push 0
push 5
push 1
push edx
call esi
mov eax, dword [ebp + 0x20]
push 0
push 0x78
push 0x78
push eax
call esi
mov ecx, dword [ebp + 0x20]
push 0
push 0x50
push 0x50
push ecx
call esi
mov edx, dword [ebp + 0x20]
push 0
push 0x1e
push 0x1f4
push edx
call esi
mov eax, dword [ebp + 0x88]
push 0
push 0xc8
push eax
mov eax, dword [ebp + 0x20]
push eax
call esi
mov byte [esp + 0xa8], 0x16
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4084c3
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0xa8], 0x12
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4084eb
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0xa8], 7
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x408513
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0xa8], 1
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40853b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0xa8], 0xffffffff
lea ecx, [esp + 0x40]
mov dword [esp + 0x40], vtable.CGdiObject.0
call fcn.0041ce7a
mov eax, 1
mov ecx, dword [esp + 0xa0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret
push 0x80070057
call fcn.0040a390
int3