Function at 0x412b20
Capabilities:
Check if file exists
Get common file path
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x440cdf
mov eax, dword fs:[0]
push eax
sub esp, 0x244
mov eax, dword [0x44fb90]
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 eax, dword [section..data]
mov edx, dword [eax + 0xc]
mov edi, ecx
mov ecx, section..data
mov dword [ebp - 0x228], edi
call edx
add eax, 0x10
mov dword [ebp - 0x22c], eax
mov dword [ebp - 4], 0
mov eax, dword [section..data]
mov edx, dword [eax + 0xc]
mov ecx, section..data
call edx
lea esi, [eax + 0x10]
mov dword [ebp - 0x238], esi
lea eax, [ebp - 0x218]
push eax
push 0
push 0
push 5
push 0
mov byte [ebp - 4], 1
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
lea eax, [ebp - 0x218]
lea ecx, [eax + 2]
nop
mov dx, word [eax]
add eax, 2
test dx, dx
jne 0x412bb0
sub eax, ecx
lea ecx, [ebp - 0x218]
sar eax, 1
push ecx
lea edx, [ebp - 0x22c]
push edx
mov ebx, eax
call fcn.00407550
push 0xd
push str.FLiNGTrainer
lea ebx, [ebp - 0x22c]
call fcn.00409d50
mov eax, ebx
push eax
lea ecx, [ebp - 0x224]
push ecx
mov ebx, str.TrainerSettings.ini
call fcn.00409a80
add esp, 8
mov byte [ebp - 4], 2
mov ecx, dword [eax]
lea eax, [ecx - 0x10]
lea ebx, [esi - 0x10]
cmp eax, ebx
je 0x412c64
cmp dword [ebx + 0xc], 0
lea esi, [ebx + 0xc]
jl 0x412c4e
mov edx, dword [eax]
cmp edx, dword [ebx]
jne 0x412c4e
call fcn.004023d0
mov dword [ebp - 0x234], eax
or eax, 0xffffffff
lock xadd dword [esi], eax
dec eax
test eax, eax
jg 0x412c3d
mov ecx, dword [ebx]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push ebx
call eax
mov esi, dword [ebp - 0x234]
add esi, 0x10
mov dword [ebp - 0x238], esi
jmp 0x412c64
mov ebx, dword [ecx - 0xc]
push ecx
lea ecx, [ebp - 0x238]
push ecx
call fcn.00407550
mov esi, dword [ebp - 0x238]
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x224]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x412c8a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x22c]
add eax, 0xfffffff0
mov dword [ebp - 0x234], eax
call fcn.004023d0
lea ebx, [eax + 0x10]
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
lea eax, [ebx - 0x10]
lea edx, [eax + 0xc]
mov dword [ebp - 0x224], ecx
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x412cd2
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp dword [ebp - 0x224], 0
jne 0x412cea
mov ecx, dword [ebp - 0x22c]
push ecx
call fcn.0042a450
add esp, 4
push 4
call fcn.0042919d
mov ebx, eax
add esp, 4
mov dword [ebp - 0x220], ebx
mov byte [ebp - 4], 3
test ebx, ebx
je 0x412d66
mov edx, dword [section..data]
mov eax, dword [edx + 0xc]
mov ecx, section..data
call eax
add eax, 0x10
mov dword [ebx], eax
mov byte [ebp - 4], 4
test esi, esi
jne 0x412d36
mov ecx, ebx
xor eax, eax
push esi
push ecx
mov ebx, eax
call fcn.00407550
mov eax, dword [ebp - 0x220]
jmp 0x412d68
mov eax, esi
lea edx, [eax + 2]
jmp 0x412d40
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x412d40
mov ecx, dword [ebp - 0x220]
sub eax, edx
sar eax, 1
push esi
push ecx
mov ebx, eax
call fcn.00407550
mov eax, dword [ebp - 0x220]
jmp 0x412d68
xor eax, eax
mov byte [ebp - 4], 1
push 8
mov dword [edi + 0x74], eax
call fcn.0042919d
mov esi, eax
add esp, 4
mov dword [ebp - 0x240], esi
mov byte [ebp - 4], 5
test esi, esi
je 0x412dc7
mov edx, dword [edi + 0x74]
mov eax, dword [section..data]
mov dword [ebp - 0x224], edx
mov edx, dword [eax + 0xc]
mov ecx, section..data
lea ebx, [esi + 4]
call edx
add eax, 0x10
mov dword [ebx], eax
push str.Trainer
push ebx
mov ebx, 7
mov byte [ebp - 4], 6
call fcn.00407550
mov eax, dword [ebp - 0x224]
mov dword [esi], eax
jmp 0x412dc9
xor esi, esi
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x238]
add eax, 0xfffffff0
mov dword [edi + 0x78], esi
mov dword [ebp - 0x224], eax
call fcn.004023d0
lea esi, [eax + 0x10]
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
xor ebx, ebx
cmp eax, 0xffffffff
setne bl
add esi, 0xfffffff0
lea ecx, [esi + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x412e12
mov ecx, dword [esi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push esi
call edx
test ebx, ebx
jne 0x412fdf
push 0x445abc
push 2
call fcn.0042b106
mov ebx, eax
mov eax, dword [section..data]
mov edx, dword [eax + 0xc]
add esp, 8
mov ecx, section..data
call edx
lea esi, [eax + 0x10]
mov dword [ebp - 0x21c], esi
mov byte [ebp - 4], 7
test ebx, ebx
je 0x412e79
test ebx, 0xffff0000
jne 0x412e79
movzx ebx, bx
push ebx
call fcn.00407720
add esp, 4
test eax, eax
je 0x412e8a
push eax
mov eax, ebx
lea edi, [ebp - 0x21c]
call fcn.00402330
mov edi, dword [ebp - 0x228]
jmp 0x412e84
lea eax, [ebp - 0x21c]
call fcn.004020d0
mov esi, dword [ebp - 0x21c]
mov byte [ebp - 4], 8
mov eax, dword [section..data]
mov edx, dword [eax + 0xc]
mov ecx, section..data
call edx
add eax, 0x10
mov dword [ebp - 0x220], eax
mov byte [ebp - 4], 9
cmp dword [esi - 0xc], 0
jl 0x412f1b
push str.Chinese
push esi
call fcn.00429b47
add esp, 8
test eax, eax
je 0x412f1b
sub eax, esi
sar eax, 1
cmp eax, 0xffffffff
je 0x412f1b
cmp dword [esi - 0xc], 0
jl 0x412ef1
push str.Traditional
push esi
call fcn.00429b47
add esp, 8
test eax, eax
je 0x412ef1
sub eax, esi
sar eax, 1
mov edx, str.Chinese_Traditional
cmp eax, 0xffffffff
jne 0x412ef6
mov edx, str.Chinese_Simplified
mov eax, edx
lea esi, [eax + 2]
jmp 0x412f00
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x412f00
sub eax, esi
sar eax, 1
push edx
lea ecx, [ebp - 0x220]
push ecx
mov ebx, eax
jmp 0x412f2c
push str.English
lea edx, [ebp - 0x220]
push edx
mov ebx, 7
call fcn.00407550
mov eax, dword [edi + 0x78]
mov ecx, dword [eax + 4]
mov eax, dword [eax]
mov eax, dword [eax]
mov ebx, dword [ebp - 0x220]
mov esi, dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
push eax
push ebx
push str.Language
push ecx
call esi
mov eax, dword [edi + 0x78]
mov ecx, dword [eax + 4]
mov eax, dword [eax]
mov eax, dword [eax]
push eax
push str.True
push str.ShowAVHint
push ecx
call esi
mov eax, dword [edi + 0x78]
mov ecx, dword [eax + 4]
mov eax, dword [eax]
mov eax, dword [eax]
push eax
push str.True
push str.OnLoadMusic
push ecx
call esi
mov eax, dword [edi + 0x78]
mov ecx, dword [eax + 4]
mov eax, dword [eax]
mov eax, dword [eax]
push eax
push str.False
push str.IgnoreGameVersion
push ecx
call esi
lea eax, [ebx - 0x10]
mov byte [ebp - 4], 8
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x412fb9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x21c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x412fdf
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [edi + 0x78]
lea esi, [ebp - 0x220]
call fcn.004121b0
mov ebx, eax
mov byte [ebp - 4], 0xa
mov eax, dword [ebx]
mov esi, dword [eax - 0xc]
test esi, esi
jns 0x413006
push 0x80070057
call fcn.00407bb0
mov ecx, 1
sub ecx, dword [eax - 4]
mov eax, dword [eax - 8]
sub eax, esi
or eax, ecx
jge 0x413020
mov eax, esi
mov ecx, ebx
call fcn.00407ad0
mov eax, dword [ebx]
lea ecx, [esi + 1]
push ecx
push eax
call fcn.00429df1
mov eax, dword [ebx]
add esp, 8
cmp esi, dword [eax - 8]
jg 0x412ffc
mov dword [eax - 0xc], esi
mov edx, dword [ebx]
xor eax, eax
mov word [edx + esi*2], ax
mov eax, dword [ebx]
sub eax, 0x10
call fcn.004023d0
lea esi, [eax + 0x10]
mov dword [ebp - 0x240], esi
mov byte [ebp - 4], 0xc
mov eax, dword [ebp - 0x220]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41307a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp dword [esi - 0xc], 0
jl 0x4130a5
push str.SIMPLIFIED
push esi
call fcn.00429b47
add esp, 8
test eax, eax
je 0x41309f
sub eax, esi
sar eax, 1
cmp eax, 0xffffffff
je 0x41309f
xor eax, eax
jmp 0x4130d0
cmp dword [esi - 0xc], 0
jge 0x4130aa
or eax, 0xffffffff
jmp 0x4130c5
push str.TRADITIONAL
push esi
call fcn.00429b47
add esp, 8
test eax, eax
jne 0x4130c1
or eax, 0xffffffff
jmp 0x4130c5
sub eax, esi
sar eax, 1
xor ecx, ecx
cmp eax, 0xffffffff
sete cl
lea eax, [ecx + 1]
push eax
push edi
call fcn.00413d80
mov edx, dword [ebp - 0x228]
mov ecx, dword [edx + 0x78]
push 1
mov edi, str.ShowAVHint
call fcn.004121e0
test eax, eax
je 0x41333f
lea eax, [ebp - 0x21c]
push eax
mov ecx, 0x445b68
call fcn.00402a70
push 1
push ecx
mov ecx, esp
mov byte [ebp - 4], 0xd
mov dword [ebp - 0x230], esp
push ecx
mov ecx, str.360Tray.exe
call fcn.00402a70
call fcn.00411a80
add esp, 8
test eax, eax
je 0x413141
push str.360Tray.exe
lea edx, [ebp - 0x21c]
push edx
mov ebx, 0xb
call fcn.00407550
push 1
push ecx
mov eax, esp
mov dword [ebp - 0x230], esp
push eax
mov ecx, str.360Safe.exe
call fcn.00402a70
call fcn.00411a80
add esp, 8
test eax, eax
je 0x413179
push str.360Safe.exe
lea ecx, [ebp - 0x21c]
push ecx
mov ebx, 0xb
call fcn.00407550
mov edx, dword [ebp - 0x21c]
cmp dword [edx - 0xc], 0
je 0x413319
lea eax, [ebp - 0x230]
push 0x448000
push eax
lea ecx, [ebp - 0x21c]
call fcn.00401fc0
push eax
lea ecx, [ebp - 0x23c]
push ecx
mov ebx, 0x447fec
mov byte [ebp - 4], 0xe
call fcn.00409a80
push eax
lea edx, [ebp - 0x244]
push edx
mov ebx, 0x447fa0
mov byte [ebp - 4], 0xf
call fcn.00409a80
push eax
lea eax, [ebp - 0x248]
push eax
mov ebx, 0x447f58
mov byte [ebp - 4], 0x10
call fcn.00409a80
push eax
lea ecx, [ebp - 0x24c]
push ecx
mov ebx, 0x447f10
mov byte [ebp - 4], 0x11
call fcn.00409a80
mov eax, dword [eax]
add esp, 0x28
push 4
push str.Fuck360
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
cmp eax, 7
mov eax, dword [ebp - 0x24c]
sete bl
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x413235
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 0x10
mov eax, dword [ebp - 0x248]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41325b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 0xf
mov eax, dword [ebp - 0x244]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x413281
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 0xe
mov eax, dword [ebp - 0x23c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4132a7
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 0xd
mov eax, dword [ebp - 0x230]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4132cd
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test bl, bl
je 0x413319
mov ecx, dword [ebp - 0x228]
mov edx, dword [ecx + 0x30]
push 0
push 0
push 2
push edx
call dword [sym.imp.USER32.dll_SendMessageW]
mov byte [ebp - 4], 0xc
mov eax, dword [ebp - 0x21c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41330d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 1
lea eax, [esi - 0x10]
jmp 0x413498
mov byte [ebp - 4], 0xc
mov eax, dword [ebp - 0x21c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41333f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov esi, dword [ebp - 0x228]
add esi, 0x7c
call fcn.0040df00
lea ecx, [ebp - 0x22c]
push ecx
lea edx, [ebp - 0x23c]
push edx
mov ebx, 0x448020
call fcn.00409a80
add esp, 8
mov esi, dword [ebp - 0x228]
add esi, 0x140
mov byte [ebp - 4], 0x12
mov ecx, dword [eax]
mov edi, dword [esi]
lea eax, [ecx - 0x10]
sub edi, 0x10
cmp eax, edi
je 0x4133cd
cmp dword [edi + 0xc], 0
lea ebx, [edi + 0xc]
jl 0x4133c3
mov edx, dword [eax]
cmp edx, dword [edi]
jne 0x4133c3
call fcn.004023d0
mov dword [ebp - 0x230], eax
or eax, 0xffffffff
lock xadd dword [ebx], eax
dec eax
test eax, eax
jg 0x4133b6
mov ecx, dword [edi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push edi
call eax
mov ecx, dword [ebp - 0x230]
add ecx, 0x10
mov dword [esi], ecx
jmp 0x4133cd
mov ebx, dword [ecx - 0xc]
push ecx
push esi
call fcn.00407550
mov byte [ebp - 4], 0xc
mov eax, dword [ebp - 0x23c]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4133f3
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esi]
sub eax, 0x10
call fcn.004023d0
lea edi, [eax + 0x10]
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
xor ebx, ebx
cmp eax, 0xffffffff
lea eax, [edi - 0x10]
setne bl
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41342b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test ebx, ebx
jne 0x41343a
mov esi, dword [esi]
push esi
call fcn.00409060
add esp, 4
mov ecx, dword [ebp - 0x228]
cmp dword [ecx + 0xac], 0
mov ebx, ecx
jne 0x413467
mov ecx, dword [ebx + 0x78]
push 1
mov edi, str.OnLoadMusic
call fcn.004121e0
test eax, eax
je 0x413467
push 1
mov ecx, ebx
call fcn.00413520
mov edx, dword [ebx + 0x30]
mov esi, dword [sym.imp.USER32.dll_SetTimer]
push 0
push 0xa
push 0x2710
push edx
call esi
mov eax, dword [ebx + 0x30]
push 0
push 0x64
push 0x2711
push eax
call esi
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x240]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4134b1
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x224]
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4134d4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x234]
mov dword [ebp - 4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4134fa
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
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.0042918e
mov esp, ebp
pop ebp
ret