Function at 0x415590
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x447d3b
mov eax, dword fs:[0]
push eax
sub esp, 0x134
mov eax, dword [0x45a5d0]
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
mov ebx, ecx
xor eax, eax
mov dword [ebp - 0x13c], eax
mov dword [ebp - 0x138], eax
mov dword [ebp - 0x5c], 7
mov dword [ebp - 0x60], eax
mov word [ebp - 0x70], ax
lea ecx, [ebp - 0xa0]
mov dword [ebp - 4], eax
call fcn.0040b6c0
push str.TrainerSettings.ini
lea edx, [ebp - 0xa0]
mov byte [ebp - 4], 1
lea ecx, [ebp - 0xb8]
call fcn.00414110
mov esi, eax
add esp, 4
lea eax, [ebp - 0x70]
cmp eax, esi
je 0x41563e
cmp dword [ebp - 0x5c], 8
jb 0x415621
push dword [ebp - 0x70]
call fcn.0042cfae
add esp, 4
xor eax, eax
mov dword [ebp - 0x5c], 7
push esi
lea ecx, [ebp - 0x70]
mov dword [ebp - 0x60], 0
mov word [ebp - 0x70], ax
call fcn.00402fa0
cmp dword [ebp - 0xa4], 8
jb 0x415655
push dword [ebp - 0xb8]
call fcn.0042cfae
add esp, 4
cmp dword [ebp - 0x8c], 8
lea eax, [ebp - 0xa0]
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmovae eax, dword [ebp - 0xa0]
push eax
call edi
cmp eax, 0xffffffff
jne 0x415694
cmp dword [ebp - 0x8c], 8
lea eax, [ebp - 0xa0]
cmovae eax, dword [ebp - 0xa0]
push eax
call fcn.0042e627
add esp, 4
push 0x18
call fcn.0042cfc4
mov esi, eax
add esp, 4
mov dword [ebp - 0x13c], esi
test esi, esi
je 0x4156d6
xor eax, eax
mov dword [esi + 0x14], 7
mov dword [esi + 0x10], 0
mov word [esi], ax
lea eax, [ebp - 0x70]
mov byte [ebp - 4], 3
cmp esi, eax
je 0x4156d8
push 0xffffffffffffffff
push 0
push eax
mov ecx, esi
call fcn.00403910
jmp 0x4156d8
xor esi, esi
mov byte [ebp - 4], 1
push 0x1c
mov dword [ebx + 0x6c], esi
call fcn.0042cfc4
mov esi, eax
add esp, 4
mov dword [ebp - 0x140], esi
mov byte [ebp - 4], 4
test esi, esi
je 0x415777
push 7
xor eax, eax
mov dword [ebp - 0xbc], 7
push str.Trainer
lea ecx, [ebp - 0xd0]
mov dword [ebp - 0xc0], 0
mov word [ebp - 0xd0], ax
call fcn.00403d10
mov edi, dword [ebx + 0x6c]
lea ecx, [esi + 4]
mov eax, 1
mov dword [ecx + 0x14], 7
mov dword [ebp - 0x138], eax
mov dword [ebp - 0x13c], eax
xor eax, eax
mov dword [ecx + 0x10], 0
mov word [ecx], ax
lea eax, [ebp - 0xd0]
mov dword [ebp - 4], 6
cmp ecx, eax
je 0x41576d
push 0xffffffffffffffff
push 0
push eax
call fcn.00403910
mov dword [esi], edi
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
jmp 0x415779
xor esi, esi
mov dword [ebp - 4], 1
mov eax, dword [ebp - 0x138]
mov dword [ebx + 0x70], esi
test al, 1
je 0x4157ad
and eax, 0xfffffffe
cmp dword [ebp - 0xbc], 8
mov dword [ebp - 0x138], eax
jb 0x4157ad
push dword [ebp - 0xd0]
call fcn.0042cfae
add esp, 4
cmp dword [ebp - 0x5c], 8
lea eax, [ebp - 0x70]
cmovae eax, dword [ebp - 0x70]
push eax
call edi
cmp eax, 0xffffffff
jne 0x415a09
push 0x450ddc
push 2
call fcn.0042e658
mov edx, eax
mov dword [ebp - 0x44], 0xf
add esp, 8
mov dword [ebp - 0x48], 0
mov byte [ebp - 0x58], 0
cmp byte [edx], 0
jne 0x4157f0
xor ecx, ecx
jmp 0x4157fe
mov ecx, edx
lea esi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4157f5
sub ecx, esi
push ecx
push edx
lea ecx, [ebp - 0x58]
call fcn.00403690
xor eax, eax
mov dword [ebp - 0x2c], 7
mov dword [ebp - 0x30], 0
mov word [ebp - 0x40], ax
push 7
push eax
push str.Chinese
lea ecx, [ebp - 0x58]
mov byte [ebp - 4], 9
call fcn.00403eb0
cmp eax, 0xffffffff
je 0x41587a
push 0xb
push 0
push str.Traditional
lea ecx, [ebp - 0x58]
call fcn.00403eb0
cmp eax, 0xffffffff
mov edx, str.Chinese_Traditional
mov ecx, str.Chinese_Simplified
cmove edx, ecx
cmp word [edx], 0
jne 0x415862
xor ecx, ecx
push ecx
push edx
jmp 0x415881
mov ecx, edx
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x415867
sub ecx, esi
sar ecx, 1
push ecx
push edx
jmp 0x415881
push 7
push str.English
lea ecx, [ebp - 0x40]
call fcn.00403d10
push 8
xor eax, eax
mov dword [ebp - 0x14], 7
push str.Language
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x18], 0
mov word [ebp - 0x28], ax
call fcn.00403d10
mov eax, dword [ebx + 0x70]
lea ecx, [eax + 4]
mov eax, dword [eax]
cmp dword [eax + 0x14], 8
jb 0x4158bc
mov eax, dword [eax]
cmp dword [ebp - 0x2c], 8
lea edx, [ebp - 0x40]
lea esi, [ebp - 0x28]
cmovae edx, dword [ebp - 0x40]
cmp dword [ebp - 0x14], 8
cmovae esi, dword [ebp - 0x28]
cmp dword [ecx + 0x14], 8
jb 0x4158da
mov ecx, dword [ecx]
push eax
push edx
push esi
push ecx
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
cmp dword [ebp - 0x14], 8
jb 0x4158f5
push dword [ebp - 0x28]
call fcn.0042cfae
add esp, 4
push 0xa
xor eax, eax
mov dword [ebp - 0x14], 7
push str.ShowAVHint
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x18], 0
mov word [ebp - 0x28], ax
call fcn.00403d10
push 1
lea eax, [ebp - 0x28]
mov byte [ebp - 4], 0xa
mov ecx, dword [ebx + 0x70]
push eax
call fcn.00414c30
mov byte [ebp - 4], 9
cmp dword [ebp - 0x14], 8
jb 0x41593f
push dword [ebp - 0x28]
call fcn.0042cfae
add esp, 4
push 0xb
xor eax, eax
mov dword [ebp - 0x14], 7
push str.OnLoadMusic
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x18], 0
mov word [ebp - 0x28], ax
call fcn.00403d10
push 1
lea eax, [ebp - 0x28]
mov byte [ebp - 4], 0xb
mov ecx, dword [ebx + 0x70]
push eax
call fcn.00414c30
mov byte [ebp - 4], 9
cmp dword [ebp - 0x14], 8
jb 0x415989
push dword [ebp - 0x28]
call fcn.0042cfae
add esp, 4
push 0x11
xor eax, eax
mov dword [ebp - 0x14], 7
push str.IgnoreGameVersion
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x18], 0
mov word [ebp - 0x28], ax
call fcn.00403d10
push 0
lea eax, [ebp - 0x28]
mov byte [ebp - 4], 0xc
mov ecx, dword [ebx + 0x70]
push eax
call fcn.00414c30
cmp dword [ebp - 0x14], 8
jb 0x4159cf
push dword [ebp - 0x28]
call fcn.0042cfae
add esp, 4
cmp dword [ebp - 0x2c], 8
jb 0x4159e0
push dword [ebp - 0x40]
call fcn.0042cfae
add esp, 4
xor eax, eax
mov byte [ebp - 4], 1
cmp dword [ebp - 0x44], 0x10
mov dword [ebp - 0x2c], 7
mov dword [ebp - 0x30], 0
mov word [ebp - 0x40], ax
jb 0x415a09
push dword [ebp - 0x58]
call fcn.0042cfae
add esp, 4
push 7
xor eax, eax
mov dword [ebp - 0x14], 7
push str.ENGLISH
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x18], 0
mov word [ebp - 0x28], ax
call fcn.00403d10
mov byte [ebp - 4], 0xd
lea ecx, [ebp - 0x58]
push 8
xor eax, eax
mov dword [ebp - 0x44], 7
push str.Language
mov dword [ebp - 0x48], 0
mov word [ebp - 0x58], ax
call fcn.00403d10
lea eax, [ebp - 0x28]
mov byte [ebp - 4], 0xe
mov ecx, dword [ebx + 0x70]
push eax
lea eax, [ebp - 0x58]
push eax
lea eax, [ebp - 0x88]
push eax
call fcn.00414a50
cmp dword [ebp - 0x44], 8
jb 0x415a7f
push dword [ebp - 0x58]
call fcn.0042cfae
add esp, 4
xor eax, eax
mov dword [ebp - 0x44], 7
mov dword [ebp - 0x48], 0
mov word [ebp - 0x58], ax
mov byte [ebp - 4], 0x11
cmp dword [ebp - 0x14], 8
jb 0x415aa8
push dword [ebp - 0x28]
call fcn.0042cfae
add esp, 4
mov edi, dword [ebp - 0x74]
lea ecx, [ebp - 0x88]
mov esi, dword [ebp - 0x88]
lea edx, [ebp - 0x88]
xor eax, eax
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
cmp edi, 8
lea eax, [ebp - 0x88]
mov dword [ebp - 0x18], 0
cmovae eax, esi
cmovae ecx, esi
mov dword [ebp - 0x13c], eax
cmovae edx, esi
mov eax, dword [ebp - 0x78]
lea eax, [ecx + eax*2]
cmp edx, eax
je 0x415b09
push ecx
push dword [ebp - 0x13c]
lea ecx, [ebp - 0x140]
push eax
call fcn.00408f30
add esp, 0xc
push 0xa
push 0
push str.SIMPLIFIED
lea ecx, [ebp - 0x88]
call fcn.0040bdd0
cmp eax, 0xffffffff
je 0x415b26
xor eax, eax
jmp 0x415b42
push 0xb
push 0
push str.TRADITIONAL
lea ecx, [ebp - 0x88]
call fcn.0040bdd0
inc eax
neg eax
sbb eax, eax
add eax, 2
push eax
mov ecx, ebx
call fcn.00416890
push 0xa
xor eax, eax
mov dword [ebp - 0x2c], 7
push str.ShowAVHint
lea ecx, [ebp - 0x40]
mov dword [ebp - 0x30], 0
mov word [ebp - 0x40], ax
call fcn.00403d10
push 1
lea eax, [ebp - 0x40]
mov byte [ebp - 4], 0x12
mov ecx, dword [ebx + 0x70]
push eax
call fcn.00414a80
mov byte [ebp - 4], 0x11
cmp dword [ebp - 0x2c], 8
mov byte [ebp - 0x131], al
jb 0x415ba0
push dword [ebp - 0x40]
call fcn.0042cfae
mov al, byte [ebp - 0x131]
add esp, 4
test al, al
je 0x415dfc
xor eax, eax
mov dword [ebp - 0x2c], 7
push eax
push 0x450fe4
lea ecx, [ebp - 0x40]
mov dword [ebp - 0x30], 0
mov word [ebp - 0x40], ax
call fcn.00403d10
sub esp, 0x18
mov byte [ebp - 4], 0x13
mov ecx, esp
xor eax, eax
push 0xb
mov dword [ecx + 0x14], 7
mov dword [ecx + 0x10], 0
push str.360Tray.exe
mov word [ecx], ax
call fcn.00403d10
mov cl, 1
call fcn.00413d50
add esp, 0x18
test eax, eax
je 0x415c0f
push 0xb
push str.360Tray.exe
lea ecx, [ebp - 0x40]
call fcn.00403d10
sub esp, 0x18
xor eax, eax
mov ecx, esp
push 0xb
mov dword [ecx + 0x14], 7
mov dword [ecx + 0x10], 0
push str.360Safe.exe
mov word [ecx], ax
call fcn.00403d10
mov cl, 1
call fcn.00413d50
add esp, 0x18
test eax, eax
je 0x415c50
push 0xb
push str.360Safe.exe
lea ecx, [ebp - 0x40]
call fcn.00403d10
cmp dword [ebp - 0x30], 0
je 0x415de7
lea eax, [ebp - 0x40]
mov edx, 0x4534d0
push eax
lea ecx, [ebp - 0xe8]
call fcn.00401300
add esp, 4
push 0x4534bc
mov edx, eax
mov byte [ebp - 4], 0x14
lea ecx, [ebp - 0x130]
call fcn.00401470
add esp, 4
push 0x453470
mov edx, eax
mov byte [ebp - 4], 0x15
lea ecx, [ebp - 0x100]
call fcn.00401470
add esp, 4
push 0x453428
mov edx, eax
mov byte [ebp - 4], 0x16
lea ecx, [ebp - 0x118]
call fcn.00401470
add esp, 4
push 0x4533e0
mov edx, eax
mov byte [ebp - 4], 0x17
lea ecx, [ebp - 0xb8]
call fcn.00401470
add esp, 4
cmp dword [ebp - 0x104], 8
jb 0x415cec
push dword [ebp - 0x118]
call fcn.0042cfae
add esp, 4
xor eax, eax
mov dword [ebp - 0x104], 7
cmp dword [ebp - 0xec], 8
mov dword [ebp - 0x108], 0
mov word [ebp - 0x118], ax
jb 0x415d20
push dword [ebp - 0x100]
call fcn.0042cfae
add esp, 4
xor eax, eax
mov dword [ebp - 0xec], 7
cmp dword [ebp - 0x11c], 8
mov dword [ebp - 0xf0], 0
mov word [ebp - 0x100], ax
jb 0x415d54
push dword [ebp - 0x130]
call fcn.0042cfae
add esp, 4
xor eax, eax
mov byte [ebp - 4], 0x13
cmp dword [ebp - 0xd4], 8
mov dword [ebp - 0x11c], 7
mov dword [ebp - 0x120], 0
mov word [ebp - 0x130], ax
jb 0x415d8c
push dword [ebp - 0xe8]
call fcn.0042cfae
add esp, 4
cmp dword [ebp - 0xa4], 8
lea eax, [ebp - 0xb8]
push 4
cmovae eax, dword [ebp - 0xb8]
push 0x4534f0
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
cmp eax, 7
jne 0x415ddc
push 0
push 0
push 2
push dword [ebx + 0x2c]
call dword [sym.imp.USER32.dll_SendMessageW]
lea ecx, [ebp - 0xb8]
call fcn.004037f0
lea ecx, [ebp - 0x40]
call fcn.004037f0
jmp 0x415f48
lea ecx, [ebp - 0xb8]
call fcn.004037f0
mov byte [ebp - 4], 0x11
cmp dword [ebp - 0x2c], 8
jb 0x415dfc
push dword [ebp - 0x40]
call fcn.0042cfae
add esp, 4
lea ecx, [ebx + 0x74]
call fcn.004101f0
push str.TrainerBGM.mid
lea edx, [ebp - 0xa0]
lea ecx, [ebp - 0xe8]
call fcn.00414110
mov edi, eax
lea esi, [ebx + 0x238]
add esp, 4
cmp esi, edi
je 0x415e54
cmp dword [esi + 0x14], 8
jb 0x415e39
push dword [esi]
call fcn.0042cfae
add esp, 4
xor eax, eax
mov dword [esi + 0x14], 7
mov dword [esi + 0x10], 0
mov ecx, esi
push edi
mov word [esi], ax
call fcn.00402fa0
cmp dword [ebp - 0xd4], 8
jb 0x415e6b
push dword [ebp - 0xe8]
call fcn.0042cfae
add esp, 4
cmp dword [esi + 0x14], 8
jb 0x415e75
mov eax, dword [esi]
jmp 0x415e77
mov eax, esi
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x415e94
cmp dword [esi + 0x14], 8
jb 0x415e8b
mov esi, dword [esi]
push esi
call fcn.0040b3a0
add esp, 4
cmp byte [ebx + 0xd8], 0
jne 0x415ee2
push str.OnLoadMusic
lea ecx, [ebp - 0xb8]
call fcn.00403e10
mov byte [ebp - 4], 0x18
mov eax, dword [ebp - 0x138]
mov ecx, dword [ebx + 0x70]
or eax, 2
mov dword [ebp - 0x138], eax
mov dword [ebp - 0x13c], eax
lea eax, [ebp - 0xb8]
push 1
push eax
call fcn.00414a80
mov byte [ebp - 0x131], 1
test al, al
jne 0x415ee9
mov byte [ebp - 0x131], 0
mov dword [ebp - 4], 0x11
mov eax, dword [ebp - 0x138]
test al, 2
je 0x415f11
cmp dword [ebp - 0xa4], 8
jb 0x415f11
push dword [ebp - 0xb8]
call fcn.0042cfae
add esp, 4
cmp byte [ebp - 0x131], 0
je 0x415f23
push 1
mov ecx, ebx
call fcn.00415fe0
mov esi, dword [sym.imp.USER32.dll_SetTimer]
push 0
push 0xa
push 0x2710
push dword [ebx + 0x2c]
call esi
push 0
push 0xc8
push 0x2711
push dword [ebx + 0x2c]
call esi
cmp dword [ebp - 0x74], 8
jb 0x415f5c
push dword [ebp - 0x88]
call fcn.0042cfae
add esp, 4
xor eax, eax
mov dword [ebp - 0x74], 7
cmp dword [ebp - 0x8c], 8
mov dword [ebp - 0x78], 0
mov word [ebp - 0x88], ax
jb 0x415f8a
push dword [ebp - 0xa0]
call fcn.0042cfae
add esp, 4
xor eax, eax
mov dword [ebp - 0x8c], 7
cmp dword [ebp - 0x5c], 8
mov dword [ebp - 0x90], 0
mov word [ebp - 0xa0], ax
jb 0x415fb8
push dword [ebp - 0x70]
call fcn.0042cfae
add esp, 4
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.0042cfb3
mov esp, ebp
pop ebp
ret