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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x44565e
mov eax, dword fs:[0]
push eax
sub esp, 0x34
push ebx
push esi
push edi
mov eax, dword [0x4574b8]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x14], ecx
call fcn.00401c40
xor edx, edx
mov ecx, eax
test ecx, ecx
setne dl
test edx, edx
jne 0x4125b7
push 0x80004005
call fcn.004019f0
mov eax, dword [ecx]
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x20], esi
lea ecx, [ebp - 0x1c]
mov dword [ebp - 4], 0
call fcn.00409f30
push str.TrainerSettings.ini
lea edx, [ebp - 0x1c]
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x18]
call fcn.004010d0
add esp, 4
mov byte [ebp - 4], 2
lea edi, [esi - 0x10]
mov edx, dword [eax]
or ebx, 0xffffffff
lea ecx, [edx - 0x10]
cmp ecx, edi
je 0x41263f
cmp dword [edi + 0xc], 0
lea esi, [edi + 0xc]
jl 0x412630
mov eax, dword [ecx]
cmp eax, dword [edi]
jne 0x412630
call fcn.00401240
mov dword [ebp - 0x24], eax
mov ecx, ebx
lock xadd dword [esi], ecx
dec ecx
test ecx, ecx
jg 0x412628
mov ecx, dword [edi]
push edi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x24]
lea esi, [eax + 0x10]
mov dword [ebp - 0x20], esi
jmp 0x41263f
push dword [edx - 0xc]
lea ecx, [ebp - 0x20]
push edx
call fcn.00408760
mov esi, dword [ebp - 0x20]
mov byte [ebp - 4], 1
mov ecx, ebx
mov edx, dword [ebp - 0x18]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x41265f
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [ebp - 0x1c]
lea ecx, [ecx - 0x10]
call fcn.00401240
lea edi, [eax + 0x10]
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
mov ecx, ebx
setne byte [ebp - 0xd]
add edi, 0xfffffff0
lea eax, [edi + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x412694
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
cmp byte [ebp - 0xd], 0
jne 0x4126a5
push dword [ebp - 0x1c]
call fcn.0042c906
add esp, 4
push 4
call fcn.0042b606
add esp, 4
mov dword [ebp - 0x3c], eax
mov byte [ebp - 4], 3
test eax, eax
je 0x4126c4
push esi
mov ecx, eax
call fcn.004118c0
jmp 0x4126c6
xor eax, eax
mov edi, dword [ebp - 0x14]
mov byte [ebp - 4], 1
push 8
mov dword [edi + 0x6c], eax
call fcn.0042b606
add esp, 4
mov dword [ebp - 0x3c], eax
mov byte [ebp - 4], 4
test eax, eax
je 0x4126f2
push ecx
push dword [edi + 0x6c]
mov ecx, eax
call fcn.00411b70
jmp 0x4126f4
xor eax, eax
mov byte [ebp - 4], 1
mov dword [edi + 0x70], eax
lea eax, [esi - 0x10]
mov ecx, eax
mov dword [ebp - 0x3c], eax
call fcn.00401240
lea esi, [eax + 0x10]
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
mov ecx, ebx
setne byte [ebp - 0xd]
add esi, 0xfffffff0
lea eax, [esi + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x412732
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
cmp byte [ebp - 0xd], 0
jne 0x4128be
push 0x44e63a
push 2
call fcn.0042c937
add esp, 8
lea ecx, [ebp - 0x18]
push eax
call fcn.00402ca0
mov byte [ebp - 4], 5
call fcn.00401c40
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x412774
push 0x80004005
call fcn.004019f0
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x24], eax
mov byte [ebp - 4], 6
mov eax, dword [ebp - 0x18]
cmp dword [eax - 0xc], 0
jl 0x412805
push str.Chinese
push eax
call fcn.0042be4b
add esp, 8
test eax, eax
je 0x412805
mov ecx, dword [ebp - 0x18]
sub eax, ecx
sar eax, 1
cmp eax, 0xffffffff
je 0x412805
cmp dword [ecx - 0xc], 0
jge 0x4127b7
or eax, 0xffffffff
jmp 0x4127d3
push str.Traditional
push ecx
call fcn.0042be4b
add esp, 8
test eax, eax
jne 0x4127ce
or eax, 0xffffffff
jmp 0x4127d3
sub eax, dword [ebp - 0x18]
sar eax, 1
cmp eax, 0xffffffff
mov edx, str.Chinese_Traditional
mov ecx, str.Chinese_Simplified
cmove edx, ecx
test edx, edx
jne 0x4127ed
xor ecx, ecx
push ecx
push edx
jmp 0x41280c
mov ecx, edx
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4127f2
sub ecx, esi
sar ecx, 1
push ecx
push edx
jmp 0x41280c
push 7
push str.English
lea ecx, [ebp - 0x24]
call fcn.00408760
mov eax, dword [edi + 0x70]
mov esi, dword [ebp - 0x24]
mov edi, dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
mov ecx, dword [eax + 4]
mov eax, dword [eax]
push dword [eax]
push esi
push str.Language
push ecx
call edi
mov ecx, dword [ebp - 0x14]
mov eax, dword [ecx + 0x70]
mov ecx, dword [eax + 4]
mov eax, dword [eax]
push dword [eax]
push str.True
push str.ShowAVHint
push ecx
call edi
mov ecx, dword [ebp - 0x14]
mov eax, dword [ecx + 0x70]
mov ecx, dword [eax + 4]
mov eax, dword [eax]
push dword [eax]
push str.True
push str.OnLoadMusic
push ecx
call edi
mov ecx, dword [ebp - 0x14]
mov eax, dword [ecx + 0x70]
mov ecx, dword [eax + 4]
mov eax, dword [eax]
push dword [eax]
push str.False
push str.IgnoreGameVersion
push ecx
call edi
add esi, 0xfffffff0
mov byte [ebp - 4], 5
mov ecx, ebx
lea eax, [esi + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x41289b
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 1
mov ecx, ebx
mov edx, dword [ebp - 0x18]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4128bb
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edi, dword [ebp - 0x14]
mov ecx, dword [edi + 0x70]
lea eax, [ebp - 0x28]
sub esp, 8
push eax
call fcn.00411c00
mov edx, eax
mov dword [ebp - 0x24], edx
mov byte [ebp - 4], 7
mov eax, dword [edx]
mov esi, dword [eax - 0xc]
test esi, esi
jns 0x4128e9
push 0x80070057
call fcn.004019f0
mov ecx, 1
sub ecx, dword [eax - 4]
mov eax, dword [eax - 8]
sub eax, esi
or eax, ecx
jge 0x412905
push esi
mov ecx, edx
call fcn.00401960
mov edx, dword [ebp - 0x24]
lea eax, [esi + 1]
push eax
push dword [edx]
call fcn.0042c300
mov ecx, dword [ebp - 0x24]
add esp, 8
mov eax, dword [ecx]
cmp esi, dword [eax - 8]
jg 0x4128df
mov dword [eax - 0xc], esi
xor edx, edx
mov eax, dword [ecx]
mov word [eax + esi*2], dx
mov ecx, dword [ecx]
sub ecx, 0x10
call fcn.00401240
lea esi, [eax + 0x10]
mov dword [ebp - 0x40], esi
mov byte [ebp - 4], 9
mov ecx, ebx
mov edx, dword [ebp - 0x28]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x412958
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
cmp dword [esi - 0xc], 0
jl 0x412983
push str.SIMPLIFIED
push esi
call fcn.0042be4b
add esp, 8
test eax, eax
je 0x41297d
sub eax, esi
sar eax, 1
cmp eax, 0xffffffff
je 0x41297d
xor ecx, ecx
jmp 0x4129ac
cmp dword [esi - 0xc], 0
jge 0x412988
or eax, 0xffffffff
jmp 0x4129a3
push str.TRADITIONAL
push esi
call fcn.0042be4b
add esp, 8
test eax, eax
jne 0x41299f
or eax, 0xffffffff
jmp 0x4129a3
sub eax, esi
sar eax, 1
xor ecx, ecx
cmp eax, 0xffffffff
sete cl
inc ecx
push ecx
mov ecx, edi
call fcn.00413650
mov ecx, dword [edi + 0x70]
push 1
push str.ShowAVHint
call fcn.00411c30
test al, al
je 0x412bc5
push 0x44e638
lea ecx, [ebp - 0x18]
call fcn.00403790
push ecx
mov ecx, esp
mov byte [ebp - 4], 0xa
push str.360Tray.exe
mov byte [ebp - 0xd], 1
call fcn.00403790
mov cl, byte [ebp - 0xd]
call fcn.004112c0
add esp, 4
test eax, eax
je 0x412a0b
push 0xb
push str.360Tray.exe
lea ecx, [ebp - 0x18]
call fcn.00408760
push ecx
mov ecx, esp
mov byte [ebp - 0xd], 1
push str.360Safe.exe
call fcn.00403790
mov cl, byte [ebp - 0xd]
call fcn.004112c0
add esp, 4
test eax, eax
je 0x412a3a
push 0xb
push str.360Safe.exe
lea ecx, [ebp - 0x18]
call fcn.00408760
mov eax, dword [ebp - 0x18]
cmp dword [eax - 0xc], 0
je 0x412ba8
lea eax, [ebp - 0x18]
mov edx, 0x4508c0
push eax
lea ecx, [ebp - 0x38]
call fcn.00402d40
add esp, 4
push 0x4508ac
mov edx, eax
mov byte [ebp - 4], 0xb
lea ecx, [ebp - 0x34]
call fcn.004010d0
add esp, 4
push 0x450860
mov edx, eax
mov byte [ebp - 4], 0xc
lea ecx, [ebp - 0x30]
call fcn.004010d0
add esp, 4
push 0x450818
mov edx, eax
mov byte [ebp - 4], 0xd
lea ecx, [ebp - 0x2c]
call fcn.004010d0
add esp, 4
push 0x4507d0
mov edx, eax
mov byte [ebp - 4], 0xe
lea ecx, [ebp - 0x24]
call fcn.004010d0
add esp, 4
push 4
push str.Fuck360
push dword [eax]
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
mov edx, dword [ebp - 0x24]
cmp eax, 7
mov ecx, ebx
sete byte [ebp - 0xd]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x412ae7
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0xd
mov ecx, ebx
mov edx, dword [ebp - 0x2c]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x412b07
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0xc
mov ecx, ebx
mov edx, dword [ebp - 0x30]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x412b27
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0xb
mov ecx, ebx
mov edx, dword [ebp - 0x34]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x412b47
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0xa
mov ecx, ebx
mov edx, dword [ebp - 0x38]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x412b67
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
cmp byte [ebp - 0xd], 0
je 0x412ba5
push 0
push 0
push 2
push dword [edi + 0x2c]
call dword [sym.imp.USER32.dll_SendMessageW]
mov byte [ebp - 4], 9
mov ecx, ebx
mov edx, dword [ebp - 0x18]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x412d06
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x412d06
mov eax, dword [ebp - 0x18]
lea edx, [eax - 0x10]
mov byte [ebp - 4], 9
lea eax, [edx + 0xc]
mov ecx, ebx
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x412bc5
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea ecx, [edi + 0x7c]
mov byte [ebp - 0xd], 1
push ecx
mov dword [ebp - 0x38], ecx
mov edi, esp
mov ecx, dword [ecx]
sub ecx, 0x10
call fcn.00401240
mov cl, byte [ebp - 0xd]
add eax, 0x10
mov dword [edi], eax
call fcn.004112c0
mov edx, dword [ebp - 0x38]
add esp, 4
mov edi, dword [edx + 8]
cmp edi, eax
je 0x412c00
xor ecx, ecx
test edi, edi
cmove ecx, eax
mov dword [edx + 8], ecx
cmp dword [edx + 8], 0
setne al
mov byte [edx + 0x20], al
test al, al
je 0x412c24
mov eax, dword [ebp - 0x14]
cmp dword [eax + 0x88], 0x10000
jae 0x412c24
mov ecx, edx
call fcn.00411210
push 0x4508e0
lea edx, [ebp - 0x1c]
lea ecx, [ebp - 0x38]
call fcn.004010d0
add esp, 4
mov edi, dword [ebp - 0x14]
add edi, 0x150
mov byte [ebp - 4], 0xf
push eax
mov ecx, edi
mov dword [ebp - 0x34], edi
call fcn.0040bdc0
mov byte [ebp - 4], 9
mov ecx, ebx
mov edx, dword [ebp - 0x38]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x412c6f
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [edi]
sub ecx, 0x10
call fcn.00401240
lea edi, [eax + 0x10]
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
mov ecx, ebx
setne byte [ebp - 0xd]
add edi, 0xfffffff0
lea eax, [edi + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x412ca3
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
cmp byte [ebp - 0xd], 0
jne 0x412cb6
mov eax, dword [ebp - 0x34]
push dword [eax]
call fcn.00409ce0
add esp, 4
mov edi, dword [ebp - 0x14]
cmp byte [edi + 0x9c], 0
jne 0x412cde
mov ecx, dword [edi + 0x70]
push 1
push str.OnLoadMusic
call fcn.00411c30
test al, al
je 0x412cde
push 1
mov ecx, edi
call fcn.00412d80
push 0
push 0xa
push 0x2710
push dword [edi + 0x2c]
mov edi, dword [sym.imp.USER32.dll_SetTimer]
call edi
mov eax, dword [ebp - 0x14]
push 0
push 0xc8
push 0x2711
push dword [eax + 0x2c]
call edi
add esi, 0xfffffff0
mov byte [ebp - 4], 1
mov ecx, ebx
lea eax, [esi + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x412d23
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0
mov ecx, ebx
mov edx, dword [ebp - 0x1c]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x412d43
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x3c]
lea eax, [edx + 0xc]
lock xadd dword [eax], ebx
dec ebx
test ebx, ebx
jg 0x412d61
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret