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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4466ee
mov eax, dword fs:[0]
push eax
sub esp, 0x34
push ebx
push esi
push edi
mov eax, dword [0x4584b8]
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 0x4134d7
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.00409d70
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 0x41355f
cmp dword [edi + 0xc], 0
lea esi, [edi + 0xc]
jl 0x413550
mov eax, dword [ecx]
cmp eax, dword [edi]
jne 0x413550
call fcn.00401240
mov dword [ebp - 0x24], eax
mov ecx, ebx
lock xadd dword [esi], ecx
dec ecx
test ecx, ecx
jg 0x413548
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 0x41355f
push dword [edx - 0xc]
lea ecx, [ebp - 0x20]
push edx
call fcn.004085a0
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 0x41357f
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 0x4135b4
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
cmp byte [ebp - 0xd], 0
jne 0x4135c5
push dword [ebp - 0x1c]
call fcn.0042d8c6
add esp, 4
push 4
call fcn.0042c5cb
add esp, 4
mov dword [ebp - 0x3c], eax
mov byte [ebp - 4], 3
test eax, eax
je 0x4135e4
push esi
mov ecx, eax
call fcn.004127e0
jmp 0x4135e6
xor eax, eax
mov edi, dword [ebp - 0x14]
mov byte [ebp - 4], 1
push 8
mov dword [edi + 0x6c], eax
call fcn.0042c5cb
add esp, 4
mov dword [ebp - 0x3c], eax
mov byte [ebp - 4], 4
test eax, eax
je 0x413612
push ecx
push dword [edi + 0x6c]
mov ecx, eax
call fcn.00412a90
jmp 0x413614
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 0x413652
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
cmp byte [ebp - 0xd], 0
jne 0x4137de
push 0x44f63a
push 2
call fcn.0042d8f7
add esp, 8
lea ecx, [ebp - 0x18]
push eax
call fcn.00402ae0
mov byte [ebp - 4], 5
call fcn.00401c40
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x413694
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 0x413725
push str.Chinese
push eax
call fcn.0042ce0b
add esp, 8
test eax, eax
je 0x413725
mov ecx, dword [ebp - 0x18]
sub eax, ecx
sar eax, 1
cmp eax, 0xffffffff
je 0x413725
cmp dword [ecx - 0xc], 0
jge 0x4136d7
or eax, 0xffffffff
jmp 0x4136f3
push str.Traditional
push ecx
call fcn.0042ce0b
add esp, 8
test eax, eax
jne 0x4136ee
or eax, 0xffffffff
jmp 0x4136f3
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 0x41370d
xor ecx, ecx
push ecx
push edx
jmp 0x41372c
mov ecx, edx
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x413712
sub ecx, esi
sar ecx, 1
push ecx
push edx
jmp 0x41372c
push 7
push str.English
lea ecx, [ebp - 0x24]
call fcn.004085a0
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 0x4137bb
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 0x4137db
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.00412b20
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 0x413809
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 0x413825
push esi
mov ecx, edx
call fcn.00401960
mov edx, dword [ebp - 0x24]
lea eax, [esi + 1]
push eax
push dword [edx]
call fcn.0042d2c0
mov ecx, dword [ebp - 0x24]
add esp, 8
mov eax, dword [ecx]
cmp esi, dword [eax - 8]
jg 0x4137ff
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 0x413878
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
cmp dword [esi - 0xc], 0
jl 0x4138a3
push str.SIMPLIFIED
push esi
call fcn.0042ce0b
add esp, 8
test eax, eax
je 0x41389d
sub eax, esi
sar eax, 1
cmp eax, 0xffffffff
je 0x41389d
xor ecx, ecx
jmp 0x4138cc
cmp dword [esi - 0xc], 0
jge 0x4138a8
or eax, 0xffffffff
jmp 0x4138c3
push str.TRADITIONAL
push esi
call fcn.0042ce0b
add esp, 8
test eax, eax
jne 0x4138bf
or eax, 0xffffffff
jmp 0x4138c3
sub eax, esi
sar eax, 1
xor ecx, ecx
cmp eax, 0xffffffff
sete cl
inc ecx
push ecx
mov ecx, edi
call fcn.004145e0
mov ecx, dword [edi + 0x70]
push 1
push str.ShowAVHint
call fcn.00412b50
test al, al
je 0x413ae5
push 0x44f638
lea ecx, [ebp - 0x18]
call fcn.004035d0
push ecx
mov ecx, esp
mov byte [ebp - 4], 0xa
push str.360Tray.exe
mov byte [ebp - 0xd], 1
call fcn.004035d0
mov cl, byte [ebp - 0xd]
call fcn.00412000
add esp, 4
test eax, eax
je 0x41392b
push 0xb
push str.360Tray.exe
lea ecx, [ebp - 0x18]
call fcn.004085a0
push ecx
mov ecx, esp
mov byte [ebp - 0xd], 1
push str.360Safe.exe
call fcn.004035d0
mov cl, byte [ebp - 0xd]
call fcn.00412000
add esp, 4
test eax, eax
je 0x41395a
push 0xb
push str.360Safe.exe
lea ecx, [ebp - 0x18]
call fcn.004085a0
mov eax, dword [ebp - 0x18]
cmp dword [eax - 0xc], 0
je 0x413ac8
lea eax, [ebp - 0x18]
mov edx, 0x451c30
push eax
lea ecx, [ebp - 0x38]
call fcn.00402b80
add esp, 4
push 0x451c1c
mov edx, eax
mov byte [ebp - 4], 0xb
lea ecx, [ebp - 0x34]
call fcn.004010d0
add esp, 4
push 0x451bd0
mov edx, eax
mov byte [ebp - 4], 0xc
lea ecx, [ebp - 0x30]
call fcn.004010d0
add esp, 4
push 0x451b88
mov edx, eax
mov byte [ebp - 4], 0xd
lea ecx, [ebp - 0x2c]
call fcn.004010d0
add esp, 4
push 0x451b40
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 0x413a07
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 0x413a27
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 0x413a47
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 0x413a67
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 0x413a87
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
cmp byte [ebp - 0xd], 0
je 0x413ac5
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 0x413cb1
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x413cb1
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 0x413ae5
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.00412000
mov edx, dword [ebp - 0x38]
add esp, 4
mov edi, dword [edx + 8]
cmp edi, eax
je 0x413b20
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 0x413b44
mov eax, dword [ebp - 0x14]
cmp dword [eax + 0x88], 0x10000
jae 0x413b44
mov ecx, edx
call fcn.00411f50
push 0x451c50
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.0040bc00
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 0x413b8f
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 0x413bc3
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
cmp byte [ebp - 0xd], 0
jne 0x413be0
mov eax, dword [ebp - 0x34]
mov edx, 0x451c70
mov ecx, 0xa7
push dword [eax]
call fcn.00409b20
add esp, 4
mov edi, dword [ebp - 0x14]
cmp byte [edi + 0x9c], 0
jne 0x413c08
mov ecx, dword [edi + 0x70]
push 1
push str.OnLoadMusic
call fcn.00412b50
test al, al
je 0x413c08
push 1
mov ecx, edi
call fcn.00413d20
push 0x4514c8
lea edx, [ebp - 0x1c]
lea ecx, [ebp - 0x34]
call fcn.004010d0
add esp, 4
push 0x451900
mov edx, eax
mov byte [ebp - 4], 0x10
lea ecx, [ebp - 0x38]
call fcn.004010d0
add esp, 4
mov byte [ebp - 4], 0x11
mov edx, 0x451c78
push dword [eax]
mov ecx, 0xc6
call fcn.00409b20
mov byte [ebp - 4], 0x10
add esp, 4
mov edx, dword [ebp - 0x38]
mov ecx, ebx
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x413c69
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 9
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 0x413c89
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
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 0x413cce
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 0x413cee
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 0x413d0c
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