Function at 0x404ea0
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 0x46277f
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.0041a081
mov eax, dword [ebp + 0xe4c]
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 + 0xe4c]
mov ecx, dword [ebp + 0x20]
push eax
xor esi, esi
push esi
push 0x80
push ecx
call edi
lea ecx, [esp + 0x14]
call fcn.00403b10
push eax
lea edx, [esp + 0x1c]
push edx
mov dword [esp + 0xb0], esi
call fcn.0044d194
mov ebx, dword [esp + 0x20]
add esp, 8
cmp ebx, esi
je 0x404f6d
push esi
lea ecx, [esp + 0x38]
call fcn.0044cf76
mov eax, dword [ebx + 4]
cmp eax, esi
jbe 0x404f4b
cmp eax, 0xffffffff
jae 0x404f4b
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.0044cf97
cmp edi, esi
je 0x404f6d
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 0x404fbe
push esi
lea ecx, [esp + 0x38]
call fcn.0044cf76
mov eax, dword [ebx + 4]
cmp eax, esi
jbe 0x404f9c
cmp eax, 0xffffffff
jae 0x404f9c
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.0044cf97
cmp edi, esi
je 0x404fbe
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], 3
mov dword [ebp + 0x88], 4
call dword [sym.imp.USER32.dll_GetDC]
push eax
call fcn.0041cbdf
push 0x30303
mov dword [0x481c18], eax
call dword [sym.imp.GDI32.dll_CreateSolidBrush]
push eax
mov ecx, 0x47e52c
call fcn.0041ceb4
push 0x46bf40
mov ecx, ebp
call fcn.0041d24e
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.0041d2aa
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.0041ceb4
mov ecx, dword [esp + 0x44]
mov edx, dword [ebp + 0x20]
push 1
push ecx
push edx
call dword [sym.imp.USER32.dll_SetWindowRgn]
lea ecx, [esp + 0x40]
call fcn.0041cedd
push ebp
call fcn.004067d0
mov eax, dword [0x481c20]
mov edx, dword [eax + 4]
push 0xff000000
lea ecx, [ebp + 0xe48]
push ecx
push edx
mov edi, eax
call sub.gdiplus.dll_GdipCreateHBITMAPFromBitmap
cmp eax, esi
je 0x40513a
mov dword [edi + 8], eax
lea eax, [ebp + 0xe50]
lea ecx, [eax + 0x74]
push ecx
push 0x81
push eax
mov dword [ebp + 0x7c], 0
call fcn.00417bf0
lea esi, [ebp + 0xf54]
lea edx, [esi + 0x74]
push edx
push 0x86
push esi
call fcn.00417bf0
lea edi, [ebp + 0x1058]
lea eax, [edi + 0x74]
push eax
push 0x88
push edi
call fcn.00417bf0
lea ebx, [ebp + 0x115c]
lea ecx, [ebx + 0x74]
push ecx
push 0x8c
push ebx
call fcn.00417bf0
lea edx, [esi + 0x70]
push edx
push 0x87
push esi
mov dword [esi + 0x54], 1
call fcn.00417bf0
lea eax, [edi + 0x70]
push eax
push 0x89
push edi
mov dword [edi + 0x54], 1
call fcn.00417bf0
lea ecx, [ebx + 0x70]
push ecx
push 0x9a
push ebx
mov dword [ebx + 0x54], 1
call fcn.00417bf0
lea eax, [ebp + 0x1364]
lea edx, [eax + 0x74]
push edx
push 0x95
push eax
call fcn.00417bf0
lea eax, [ebp + 0x1260]
lea ecx, [eax + 0x74]
push ecx
push 0x93
push eax
call fcn.00417bf0
lea eax, [ebp + 0x1364]
lea edx, [eax + 0x70]
push edx
push 0x96
push eax
mov dword [eax + 0x54], 1
call fcn.00417bf0
lea eax, [ebp + 0x1260]
lea ecx, [eax + 0x70]
push ecx
push 0x94
push eax
mov dword [eax + 0x54], 1
call fcn.00417bf0
mov ecx, dword [ebp + 0x14e0]
test ecx, ecx
lea eax, [ebp + 0x14e0]
mov dword [esp + 0x18], eax
je 0x405255
mov edx, dword [ecx]
mov eax, dword [edx]
push 1
call eax
mov ecx, dword [esp + 0x18]
push ecx
push 0x97
lea eax, [ebp + 0x1468]
push eax
call fcn.00417bf0
cmp dword [ebp + 0x14bc], 0
jne 0x405280
mov edx, dword [esp + 0x18]
mov eax, dword [edx]
mov dword [ebp + 0x14bc], eax
mov ecx, dword [ebp + 0x14e4]
test ecx, ecx
lea eax, [ebp + 0x14e4]
mov dword [esp + 0x14], eax
je 0x40529c
mov edx, dword [ecx]
mov eax, dword [edx]
push 1
call eax
mov ecx, dword [esp + 0x14]
push ecx
push 0x98
lea eax, [ebp + 0x1468]
push eax
call fcn.00417bf0
cmp dword [ebp + 0x14bc], 0
jne 0x4052c7
mov edx, dword [ebp + 0x14e0]
mov dword [ebp + 0x14bc], edx
mov ecx, dword [ebp + 0x14e8]
test ecx, ecx
lea eax, [ebp + 0x14e8]
mov dword [esp + 0x14], eax
je 0x4052e3
mov eax, dword [ecx]
mov edx, dword [eax]
push 1
call edx
mov eax, dword [esp + 0x14]
push eax
push 0x99
lea eax, [ebp + 0x1468]
push eax
call fcn.00417bf0
cmp dword [ebp + 0x14bc], 0
jne 0x40530e
mov ecx, dword [ebp + 0x14e0]
mov dword [ebp + 0x14bc], ecx
mov ecx, dword [ebp + 0x157c]
test ecx, ecx
lea eax, [ebp + 0x157c]
mov dword [esp + 0x18], eax
je 0x40532a
mov edx, dword [ecx]
mov eax, dword [edx]
push 1
call eax
mov ecx, dword [esp + 0x18]
push ecx
push 0x90
lea eax, [ebp + 0x1504]
push eax
call fcn.00417bf0
cmp dword [ebp + 0x1558], 0
jne 0x405355
mov edx, dword [esp + 0x18]
mov eax, dword [edx]
mov dword [ebp + 0x1558], eax
mov ecx, dword [ebp + 0x1580]
test ecx, ecx
lea eax, [ebp + 0x1580]
mov dword [esp + 0x14], eax
je 0x405371
mov edx, dword [ecx]
mov eax, dword [edx]
push 1
call eax
mov ecx, dword [esp + 0x14]
push ecx
push 0x91
lea eax, [ebp + 0x1504]
push eax
call fcn.00417bf0
cmp dword [ebp + 0x1558], 0
jne 0x40539c
mov edx, dword [ebp + 0x157c]
mov dword [ebp + 0x1558], edx
mov ecx, dword [ebp + 0x1584]
test ecx, ecx
lea eax, [ebp + 0x1584]
mov dword [esp + 0x14], eax
je 0x4053b8
mov eax, dword [ecx]
mov edx, dword [eax]
push 1
call edx
mov eax, dword [esp + 0x14]
push eax
push 0x92
lea eax, [ebp + 0x1504]
push eax
call fcn.00417bf0
cmp dword [ebp + 0x1558], 0
jne 0x4053e3
mov ecx, dword [ebp + 0x157c]
mov dword [ebp + 0x1558], ecx
cmp dword [esi + 0x54], 0
mov eax, 1
je 0x4053fd
lea edx, [esi + 0xc0]
mov dword [esi + 0x60], eax
mov dword [esi + 0x100], edx
cmp dword [edi + 0x54], 0
je 0x405412
lea ecx, [edi + 0xc0]
mov dword [edi + 0x60], eax
mov dword [edi + 0x100], ecx
cmp dword [ebx + 0x54], 0
je 0x405427
lea edx, [ebx + 0xc0]
mov dword [ebx + 0x60], eax
mov dword [ebx + 0x100], edx
cmp dword [ebp + 0x13b8], 0
je 0x405442
lea ecx, [ebp + 0x1424]
mov dword [ebp + 0x13c4], eax
mov dword [ebp + 0x1464], ecx
cmp dword [ebp + 0x12b4], 0
je 0x40545d
lea edx, [ebp + 0x1320]
mov dword [ebp + 0x12c0], eax
mov dword [ebp + 0x1360], edx
push 1
push 0x19
push 0x183
push 7
push 4
lea ecx, [ebp + 0x1468]
call fcn.0041d2aa
push 1
push 0x1a
push 0x27
push 5
push 0x190
mov ecx, esi
call fcn.0041d2aa
push 1
push 0x1a
push 0x27
push 5
push 0x1bb
mov ecx, edi
call fcn.0041d2aa
push 1
push 0x1a
push 0x45
push 5
push 0x1e5
mov ecx, ebx
call fcn.0041d2aa
push 1
push 0x1a
push 0x18
push 5
push 0x22a
lea ecx, [ebp + 0xe50]
call fcn.0041d2aa
push 1
push 0x1f
push 0x30
push 0x13b
push 0x1ec
lea ecx, [ebp + 0x1260]
call fcn.0041d2aa
push 1
push 0x1f
push 0x20
push 0x13b
push 0x21f
lea ecx, [ebp + 0x1364]
call fcn.0041d2aa
push 1
push 0x104
push 0x161
push 0x2e
push 0xdd
lea ecx, [ebp + 0x1504]
call fcn.0041d2aa
push 0x481c30
push 0
push 0
push 5
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
mov eax, 0x481c30
lea ecx, [eax + 2]
jmp 0x405540
mov dx, word [eax]
add eax, 2
test dx, dx
jne 0x405540
sub eax, ecx
sar eax, 1
push eax
push 0x481c30
mov ecx, 0x4856d4
call fcn.00408400
push 0xd
push str.FLiNGTrainer
mov ecx, 0x4856d4
call fcn.00407cb0
mov eax, dword [0x4856d4]
add eax, 0xfffffff0
push eax
call fcn.00408510
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 0x4055b1
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
test ebx, ebx
jne 0x4055c4
mov ecx, dword [0x4856d4]
push ecx
call fcn.00433326
add esp, 4
push str.TrainerSettings.ini
lea edx, [esp + 0x18]
push 0x4856d4
push edx
call fcn.00407800
add esp, 0xc
lea ebx, [ebp + 0xa0]
push eax
mov ecx, ebx
mov byte [esp + 0xac], 2
call fcn.00408380
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 0x405619
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.00408510
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 0x405653
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 0x40577b
push 0x46b2f8
push 2
call fcn.00434233
add esp, 8
push eax
lea ecx, [esp + 0x1c]
call fcn.00408750
mov byte [esp + 0xa8], 3
mov eax, dword [esp + 0x18]
cmp dword [eax - 0xc], 0
jl 0x4056f0
push str.Chinese
push eax
call fcn.004343a3
add esp, 8
test eax, eax
je 0x4056f0
mov ecx, dword [esp + 0x18]
sub eax, ecx
sar eax, 1
cmp eax, 0xffffffff
je 0x4056f0
cmp dword [ecx - 0xc], 0
jl 0x4056df
push str.Traditional
push ecx
call fcn.004343a3
add esp, 8
test eax, eax
je 0x4056df
sub eax, dword [esp + 0x18]
sar eax, 1
cmp eax, 0xffffffff
je 0x4056df
push str.Chinese_Traditional
mov ecx, 0x4856d8
call fcn.00408580
jmp 0x405701
push str.Chinese_Simplified
mov ecx, 0x4856d8
call fcn.00408580
jmp 0x405701
push 7
push str.English
mov ecx, 0x4856d8
call fcn.00408400
mov eax, dword [ebx]
mov ecx, dword [0x4856d8]
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 0x40577b
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.00408910
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.00408510
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.00408910
push ecx
mov byte [esp + 0xb8], 6
mov ecx, esp
mov dword [esp + 0x24], esp
push str.Trainer
call fcn.00408910
lea edi, [esp + 0x2c]
mov byte [esp + 0xb8], 1
call fcn.00406a60
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 0x405826
test dx, dx
je 0x405822
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x405826
add eax, 4
add ecx, 4
test dx, dx
jne 0x405800
xor eax, eax
jmp 0x40582b
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
sete al
test al, al
je 0x4058fc
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.00408910
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.00408510
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.00408910
push ecx
mov byte [esp + 0xb8], 0xa
mov ecx, esp
mov dword [esp + 0x44], esp
push str.Trainer
call fcn.00408910
lea edi, [esp + 0x24]
mov byte [esp + 0xb8], 7
call fcn.00406a60
push eax
lea ecx, [esp + 0x20]
mov byte [esp + 0xac], 0xb
call fcn.00408380
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 0x4058f8
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 0x40591e
push esi
lea ecx, [esp + 0x20]
call fcn.00408270
mov edi, dword [esp + 0x1c]
lea ecx, [esi + 1]
push ecx
push edi
call fcn.00434659
add esp, 8
test esi, esi
jl 0x4061b3
mov eax, dword [esp + 0x1c]
cmp esi, dword [eax - 8]
jg 0x4061b3
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.00408380
mov ecx, dword [esp + 0x1c]
mov eax, dword [ecx - 0xc]
test eax, eax
jl 0x405985
push str.FALSE
push ecx
call fcn.004343a3
add esp, 8
test eax, eax
je 0x405985
sub eax, dword [esp + 0x1c]
sar eax, 1
cmp eax, 0xffffffff
jne 0x405ae7
push str.None
lea ecx, [esp + 0x1c]
call fcn.00408910
push ecx
mov byte [esp + 0xac], 0xc
mov ecx, esp
mov dword [esp + 0x34], esp
push str.360Tray
call fcn.00408910
call fcn.0040d8c0
test eax, eax
je 0x4059c5
push 7
push str.360Tray
lea ecx, [esp + 0x20]
call fcn.00408400
push ecx
mov ecx, esp
mov dword [esp + 0x34], esp
push str.360Safe
call fcn.00408910
call fcn.0040d8c0
test eax, eax
je 0x4059ef
push 7
push str.360Safe
lea ecx, [esp + 0x20]
call fcn.00408400
lea ecx, [esp + 0x18]
push str.None
push ecx
call fcn.004079d0
add esp, 8
test al, al
je 0x405abf
lea edx, [esp + 0x34]
push 0x46c218
push edx
lea ecx, [esp + 0x20]
call fcn.004078e0
push 0x46c128
push eax
lea eax, [esp + 0x24]
push eax
mov byte [esp + 0xbc], 0xd
call fcn.00407800
add esp, 0x14
push 4
mov byte [esp + 0xac], 0xe
mov eax, dword [eax]
push str.Fuck360
push eax
mov ecx, ebp
call fcn.0041f061
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 0x405a80
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 0x405aa8
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp byte [esp + 0x2f], 0
je 0x405abf
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 0x405ae7
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.00408910
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.00408510
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.00408910
push ecx
mov byte [esp + 0xb8], 0x11
mov ecx, esp
mov dword [esp + 0x24], esp
push str.Trainer
call fcn.00408910
lea edi, [esp + 0x30]
mov byte [esp + 0xb8], 7
call fcn.00406a60
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 0x405b85
push esi
mov ecx, edi
call fcn.00408270
mov edx, dword [esp + 0x20]
lea ecx, [esi + 1]
push ecx
push edx
call fcn.00434659
add esp, 8
test esi, esi
jl 0x4061b3
mov eax, dword [esp + 0x20]
cmp esi, dword [eax - 8]
jg 0x4061b3
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.00408380
mov ecx, dword [esp + 0x20]
cmp dword [ecx - 0xc], 0
jl 0x405c18
push 0x46c238
push ecx
call fcn.004343a3
mov ecx, dword [esp + 0x28]
add esp, 8
test eax, eax
je 0x405bf0
sub eax, ecx
sar eax, 1
cmp eax, 0xffffffff
je 0x405bf0
mov eax, 1
jmp 0x405c1d
cmp dword [ecx - 0xc], 0
jl 0x405c18
push str.TRADITIONAL
push ecx
call fcn.004343a3
add esp, 8
test eax, eax
je 0x405c18
sub eax, dword [esp + 0x20]
sar eax, 1
cmp eax, 0xffffffff
mov eax, 2
jne 0x405c1d
mov eax, 3
mov esi, ebp
call fcn.00406c50
push ecx
mov ecx, esp
mov dword [esp + 0x34], esp
push str.Error
call fcn.00408910
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.00408510
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.00408910
push ecx
mov byte [esp + 0xb8], 0x15
mov ecx, esp
mov dword [esp + 0x24], esp
push str.Trainer
call fcn.00408910
lea edi, [esp + 0x38]
mov byte [esp + 0xb8], 0x12
call fcn.00406a60
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 0x405cc2
push esi
mov ecx, edi
call fcn.00408270
mov edx, dword [esp + 0x28]
lea ecx, [esi + 1]
push ecx
push edx
call fcn.00434659
add esp, 8
test esi, esi
jl 0x4061b3
mov eax, dword [esp + 0x28]
cmp esi, dword [eax - 8]
jg 0x4061b3
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.00408380
mov esi, dword [esp + 0x28]
mov ecx, str.ERROR
mov eax, esi
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x405d2e
test dx, dx
je 0x405d2a
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x405d2e
add eax, 4
add ecx, 4
test dx, dx
jne 0x405d08
xor eax, eax
jmp 0x405d33
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
sete al
test al, al
je 0x405d58
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 0x405d87
push str.TRUE
push esi
call fcn.004343a3
add esp, 8
test eax, eax
je 0x405d87
sub eax, dword [esp + 0x28]
sar eax, 1
cmp eax, 0xffffffff
je 0x405d87
mov dword [ebp + 0x80], 1
jmp 0x405d91
mov dword [ebp + 0x80], 0
call fcn.004066a0
test eax, eax
jne 0x405dc6
mov eax, dword [ebp + 0x8c]
mov ecx, dword [ebp + 0xb8]
push 0x34
push eax
push ecx
mov ecx, ebp
call fcn.0041f061
cmp eax, 6
jne 0x405dc6
mov ecx, dword [ebp + 0x20]
push 0
push 0
push 0x10
push ecx
call dword [sym.imp.USER32.dll_SendMessageW]
push 0x4856cc
lea edx, [esp + 0x18]
push 0x4856d4
push edx
call fcn.00407740
add esp, 0xc
mov byte [esp + 0xa8], 0x17
mov edx, dword [eax]
mov ecx, ebp
call fcn.004068c0
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 0x405e16
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, 0x4856d4
call fcn.004078e0
push 0x4856cc
push eax
lea edx, [esp + 0x48]
push edx
mov byte [esp + 0xbc], 0x18
call fcn.00407740
add esp, 0x14
push str.__type_mpegvideo_alias_media
push eax
lea eax, [esp + 0x44]
push eax
mov byte [esp + 0xb4], 0x19
call fcn.00407800
add esp, 0xc
push eax
mov ecx, 0x4856c8
mov byte [esp + 0xac], 0x1a
call fcn.00408380
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 0x405e9b
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 0x405ec3
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 0x405eeb
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.00408910
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.00408510
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.00408910
push ecx
mov ecx, esp
mov dword [esp + 0x58], esp
push str.Trainer
mov byte [esp + 0xbc], 0x1d
call fcn.00408910
lea edi, [esp + 0x34]
mov byte [esp + 0xb8], 0x16
call fcn.00406a60
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 0x405f96
test dx, dx
je 0x405f92
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x405f96
add eax, 4
add ecx, 4
test dx, dx
jne 0x405f70
xor eax, eax
jmp 0x405f9b
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
sete al
test al, al
je 0x405fd0
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.00408400
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 0x405ff2
push esi
lea ecx, [esp + 0x28]
call fcn.00408270
mov edi, dword [esp + 0x24]
lea ecx, [esi + 1]
push ecx
push edi
call fcn.00434659
add esp, 8
test esi, esi
jl 0x4061b3
mov eax, dword [esp + 0x24]
cmp esi, dword [eax - 8]
jg 0x4061b3
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.00408380
mov eax, dword [esp + 0x24]
cmp dword [eax - 0xc], 0
jl 0x406054
push str.FALSE
push eax
call fcn.004343a3
add esp, 8
test eax, eax
je 0x406054
sub eax, dword [esp + 0x24]
sar eax, 1
cmp eax, 0xffffffff
jne 0x406070
push ecx
mov esi, esp
mov dword [esp + 0x4c], esp
call fcn.0040db10
call fcn.0040d8c0
test eax, eax
jne 0x406070
mov esi, ebp
call fcn.004069c0
mov esi, ebp
call fcn.0040ef70
mov ecx, dword [ebp + 0x20]
push 0
push ecx
mov ecx, ebp
mov dword [ebp + 0xe0c], 0
call fcn.00406bb0
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 + 0x84]
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 0x406103
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 0x40612b
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 0x406153
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 0x40617b
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.0041cf07
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.00408a00
int3