Function at 0x40f270
Capabilities:
Delete file
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x63c
mov eax, dword [0x4fa2a0]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
xor eax, eax
mov esi, ecx
push 0x206
push eax
lea ecx, [ebp - 0x61e]
push ecx
mov dword [ebp - 0x638], esi
mov word [ebp - 0x620], ax
call fcn.00436f70
xor edx, edx
push 0x206
push edx
lea eax, [ebp - 0x416]
push eax
mov word [ebp - 0x418], dx
call fcn.00436f70
mov ebx, dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
add esp, 0x18
lea ecx, [ebp - 0x624]
push ecx
push 0
push 0
mov dword [ebp - 0x624], 0
call ebx
test eax, eax
jne 0x40f309
mov eax, dword [ebp - 0x624]
lea edx, [ebp - 0x620]
push edx
push eax
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
mov ecx, dword [ebp - 0x624]
push ecx
call dword [sym.imp.ole32.dll_CoTaskMemFree]
mov edx, dword [0x4fb44c]
mov eax, dword [edx + 0xc]
mov ecx, 0x4fb44c
call eax
mov ecx, dword [ebp + 8]
push ecx
lea edx, [ebp - 0x620]
push edx
add eax, 0x10
push str._s_s
lea edi, [ebp - 0x62c]
mov dword [ebp - 0x62c], eax
call fcn.00403de0
add esp, 0xc
push 0
call dword [sym.imp.ole32.dll_CoInitialize]
mov edi, dword [ebp - 0x62c]
test edi, edi
je 0x40f35f
lea eax, [ebp - 0x418]
push eax
push edi
call fcn.0040d0c0
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea ecx, [ebp - 0x418]
push ecx
lea edx, [ebp - 0x628]
push edx
mov eax, esi
call fcn.0040dd10
mov eax, dword [0x4fb44c]
mov edx, dword [eax + 0xc]
mov ecx, 0x4fb44c
call edx
add eax, 0x10
mov dword [ebp - 0x630], eax
mov eax, dword [0x4ff104]
test eax, eax
jne 0x40f3bd
push 0x24d4
call fcn.0042d9ac
add esp, 4
test eax, eax
je 0x40f3b6
mov esi, eax
call fcn.00411390
jmp 0x40f3b8
xor eax, eax
mov dword [0x4ff104], eax
add eax, 0x410
push eax
push str._s_resdesk.ico
lea edi, [ebp - 0x630]
call fcn.00403de0
xor eax, eax
push 0x206
push eax
lea ecx, [ebp - 0x20e]
push ecx
mov word [ebp - 0x210], ax
call fcn.00436f70
add esp, 0x14
lea edx, [ebp - 0x624]
push edx
push 0
push 0
mov dword [ebp - 0x624], 0
call ebx
test eax, eax
jne 0x40f63c
mov ecx, dword [ebp - 0x624]
lea eax, [ebp - 0x210]
push eax
push ecx
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
mov edx, dword [ebp - 0x624]
push edx
mov esi, eax
call dword [sym.imp.ole32.dll_CoTaskMemFree]
test esi, esi
je 0x40f63c
mov esi, dword [ebp - 0x628]
mov eax, dword [esi - 0xc]
test eax, eax
jne 0x40f48e
mov eax, dword [ebp + 0xc]
cmp dword [eax - 0xc], 0
mov edx, str._main
lea edi, [ebp - 0x628]
jne 0x40f463
call fcn.00403380
jmp 0x40f4bc
call fcn.00403380
lea ecx, [ebp - 0x628]
push ecx
mov edx, str.__gameid
call fcn.00403c70
mov eax, dword [ebp + 0xc]
mov edx, dword [eax - 0xc]
push edx
push eax
lea ebx, [ebp - 0x628]
call fcn.00403d20
jmp 0x40f4bc
js 0x40f4ab
push str._main
push esi
call fcn.0042f555
add esp, 8
test eax, eax
je 0x40f4ab
sub eax, esi
sar eax, 1
cmp eax, 0xffffffff
jne 0x40f4bc
lea eax, [ebp - 0x628]
push eax
mov edx, str.__main
call fcn.00403c70
mov eax, dword [0x4ff104]
test eax, eax
jne 0x40f4e6
push 0x24d4
call fcn.0042d9ac
add esp, 4
test eax, eax
je 0x40f4df
mov esi, eax
call fcn.00411390
jmp 0x40f4e1
xor eax, eax
mov dword [0x4ff104], eax
add eax, 0x820
lea esi, [ebp - 0x634]
call fcn.00403290
mov edi, dword [ebp - 0x634]
cmp dword [edi - 0xc], 0
jl 0x40f52f
push 0x4d54b4
push edi
call fcn.0042f555
add esp, 8
test eax, eax
je 0x40f52f
sub eax, edi
sar eax, 1
cmp eax, 0xffffffff
je 0x40f52f
push 0xc
push str.__abroadgame
lea ebx, [ebp - 0x628]
call fcn.00403d20
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
call fcn.00403cb0
add eax, 0x10
mov dword [ebp - 0x624], eax
mov eax, dword [0x4ff104]
test eax, eax
jne 0x40f56d
push 0x24d4
call fcn.0042d9ac
add esp, 4
test eax, eax
je 0x40f566
mov esi, eax
call fcn.00411390
jmp 0x40f568
xor eax, eax
mov dword [0x4ff104], eax
cmp byte [eax + 0x24d0], 0
lea ebx, [ebp - 0x624]
je 0x40f585
push 7
push 0x4d5440
jmp 0x40f58c
push 0xc
push str._Trainer.lnk
call fcn.00403d20
mov esi, dword [ebp - 0x624]
cmp dword [esi - 4], 1
jle 0x40f5b3
mov ecx, dword [esi - 0xc]
push ecx
lea edx, [ebp - 0x624]
push edx
call fcn.00403650
mov esi, dword [ebp - 0x624]
mov eax, dword [ebp - 0x638]
mov ecx, dword [ebp - 0x630]
mov edx, dword [ebp - 0x628]
push esi
add eax, 0xc30
push eax
push ecx
mov ebx, 0x4d4de0
lea ecx, [ebp - 0x210]
call fcn.0040cf00
mov eax, dword [esi - 8]
push eax
push esi
call fcn.0042dec6
add esp, 8
test eax, eax
js 0x40f6f3
cmp eax, dword [esi - 8]
jg 0x40f6f3
xor edx, edx
mov dword [esi - 0xc], eax
mov word [esi + eax*2], dx
lea eax, [esi - 0x10]
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40f620
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [edi - 0x10]
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40f63c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x630]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40f65e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x628]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40f680
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x62c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40f6a2
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40f6c1
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp + 0xc]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40f6e0
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0042cf67
mov esp, ebp
pop ebp
ret 8
push 0x80070057
call fcn.00403050
int3