Function at 0x406b60
Capabilities:
Check if file exists
Copy file
Create process on windows
Get common file path
Get startup folder
Print debug messages
Write file to startup folder

Disassembly:
push 0xffffffffffffffff
push 0x545a86
mov eax, dword fs:[0]
push eax
sub esp, 0x128
mov eax, dword [0x591d64]
xor eax, esp
mov dword [esp + 0x124], eax
push ebx
push ebp
push edi
mov eax, dword [0x591d64]
xor eax, esp
push eax
lea eax, [esp + 0x138]
mov dword fs:[0], eax
call fcn.00415458
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x406bb4
push 0x80004005
call fcn.0040e230
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x10], eax
mov dword [esp + 0x140], 0
call fcn.00415458
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x406be9
push 0x80004005
call fcn.0040e230
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x20], eax
mov byte [esp + 0x140], 1
mov ecx, dword [esi + 0xe8]
push ecx
lea edx, [esp + 0x14]
push str._sGameInfo_toSystem
push edx
call fcn.0040de30
mov ebx, dword [esp + 0x1c]
add esp, 0xc
push ebx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
mov ebp, dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
test eax, eax
je 0x406dbf
push 0x103
lea eax, [esp + 0x31]
push 0
push eax
mov byte [esp + 0x38], 0
call fcn.00507960
add esp, 0xc
push 0x104
lea ecx, [esp + 0x30]
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
movsx edx, byte [esp + 0x2c]
push edx
lea eax, [esp + 0x24]
push str._c:_
push eax
call fcn.0040de30
mov eax, dword [esp + 0x2c]
add esp, 8
add eax, 0xfffffff0
mov dword [esp + 0x18], esp
mov edi, esp
push eax
call fcn.0040e260
add eax, 0x10
mov dword [edi], eax
mov byte [esp + 0x148], 2
lea eax, [ebx - 0x10]
mov dword [esp + 0x24], esp
mov edi, esp
push eax
call fcn.0040e260
add eax, 0x10
mov dword [edi], eax
add esp, 4
mov ecx, esi
mov byte [esp + 0x148], 1
call fcn.00409a90
lea ecx, [esp + 0x10]
push ecx
lea edx, [esp + 0x20]
push str.Msg:copy_succeed_
push edx
call fcn.0040d960
add esp, 0xc
push str.__to__
push eax
lea eax, [esp + 0x30]
push eax
mov byte [esp + 0x14c], 3
call fcn.0040db20
add esp, 0xc
lea ecx, [esp + 0x20]
push ecx
push eax
lea edx, [esp + 0x2c]
mov bl, 4
push edx
mov byte [esp + 0x14c], bl
call fcn.0040a760
add esp, 0xc
push 0x56ece8
push eax
lea eax, [esp + 0x20]
push eax
mov byte [esp + 0x14c], 5
call fcn.0040db20
mov eax, dword [eax]
add esp, 0xc
push eax
call ebp
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406d48
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x140], bl
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406d6f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x140], 3
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406d97
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x140], 1
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406dbf
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esi + 0xe8]
push ecx
lea edx, [esp + 0x14]
push str._sGameInfoCurrentUserDir
push edx
call fcn.0040de30
mov eax, dword [esp + 0x1c]
add esp, 0xc
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
mov ebx, dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
test eax, eax
je 0x406fa7
push 0x103
lea ecx, [esp + 0x31]
push 0
push ecx
mov byte [esp + 0x38], 0
call fcn.00507960
add esp, 0xc
push 0
push 0x1a
lea edx, [esp + 0x34]
push edx
push 0
call ebx
lea eax, [esp + 0x2c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecA]
push ecx
lea edx, [esp + 0x30]
mov ecx, esp
mov dword [esp + 0x18], esp
push edx
call fcn.0040d8a0
mov byte [esp + 0x144], 6
mov eax, dword [esp + 0x14]
push ecx
add eax, 0xfffffff0
mov dword [esp + 0x24], esp
mov edi, esp
push eax
call fcn.0040e260
add eax, 0x10
mov dword [edi], eax
add esp, 4
mov ecx, esi
mov byte [esp + 0x148], 1
call fcn.00409a90
lea eax, [esp + 0x2c]
push eax
lea ecx, [esp + 0x18]
call fcn.0040d8a0
mov edi, eax
lea ecx, [esp + 0x10]
push ecx
lea edx, [esp + 0x1c]
push str.Msg:copy_succeed_
push edx
mov byte [esp + 0x14c], 7
call fcn.0040d960
add esp, 0xc
push str.__to__
push eax
lea eax, [esp + 0x2c]
push eax
mov byte [esp + 0x14c], 8
call fcn.0040db20
add esp, 0xc
push edi
push eax
lea ecx, [esp + 0x30]
push ecx
mov byte [esp + 0x14c], 9
call fcn.0040a760
add esp, 0xc
push 0x56ece8
push eax
lea edx, [esp + 0x24]
push edx
mov byte [esp + 0x14c], 0xa
call fcn.0040db20
mov eax, dword [eax]
add esp, 0xc
push eax
call ebp
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406f07
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x140], 9
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406f2f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x140], 8
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406f57
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x140], 7
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406f7f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x140], 1
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406fa7
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esi + 0xe8]
push ecx
lea edx, [esp + 0x14]
push str._sGameInfoMy_Documents
push edx
call fcn.0040de30
mov eax, dword [esp + 0x1c]
add esp, 0xc
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x40717e
push 0x103
lea ecx, [esp + 0x31]
push 0
push ecx
mov byte [esp + 0x38], 0
call fcn.00507960
add esp, 0xc
push 0
push 5
lea edx, [esp + 0x34]
push edx
push 0
call ebx
push ecx
lea eax, [esp + 0x30]
mov ecx, esp
mov dword [esp + 0x18], esp
push eax
call fcn.0040d8a0
mov byte [esp + 0x144], 0xb
mov eax, dword [esp + 0x14]
push ecx
add eax, 0xfffffff0
mov dword [esp + 0x24], esp
mov edi, esp
push eax
call fcn.0040e260
add eax, 0x10
mov dword [edi], eax
add esp, 4
mov ecx, esi
mov byte [esp + 0x148], 1
call fcn.00409a90
lea ecx, [esp + 0x2c]
push ecx
lea ecx, [esp + 0x1c]
call fcn.0040d8a0
mov edi, eax
lea edx, [esp + 0x10]
push edx
lea eax, [esp + 0x28]
push str.Msg:copy_succeed_
push eax
mov byte [esp + 0x14c], 0xc
call fcn.0040d960
add esp, 0xc
push str.__to__
push eax
lea ecx, [esp + 0x30]
push ecx
mov byte [esp + 0x14c], 0xd
call fcn.0040db20
add esp, 0xc
push edi
push eax
lea edx, [esp + 0x24]
mov bl, 0xe
push edx
mov byte [esp + 0x14c], bl
call fcn.0040a760
add esp, 0xc
push 0x56ece8
push eax
lea eax, [esp + 0x1c]
push eax
mov byte [esp + 0x14c], 0xf
call fcn.0040db20
mov eax, dword [eax]
add esp, 0xc
push eax
call ebp
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4070df
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x140], bl
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x407106
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x140], 0xd
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40712e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x140], 0xc
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x407156
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x140], 1
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40717e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esi + 0xe8]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x4071d5
push ecx
mov ecx, esp
mov dword [esp + 0x18], esp
push 0x56f1a0
call fcn.0040d8a0
mov byte [esp + 0x144], 0x10
mov eax, dword [esi + 0xe8]
push ecx
sub eax, 0x10
mov dword [esp + 0x24], esp
mov edi, esp
push eax
call fcn.0040e260
add eax, 0x10
mov dword [edi], eax
add esp, 4
mov ecx, esi
mov byte [esp + 0x148], 1
call fcn.00406330
mov ecx, dword [esi + 0xe8]
push ecx
lea edx, [esp + 0x14]
push str._sGameInfo_run.bat
push edx
call fcn.0040de30
mov edi, dword [esp + 0x1c]
mov ebp, dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
add esp, 0xc
push edi
call ebp
test eax, eax
je 0x407259
push 0x5c
push edi
call fcn.00506452
add esp, 8
test eax, eax
jne 0x407213
or eax, 0xffffffff
jmp 0x407215
sub eax, edi
push eax
push 0
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x1c]
call fcn.0040a5b0
mov ebx, dword [esp + 0x14]
push 0
push ebx
push 0
push edi
push str.open
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteA]
lea eax, [ebx - 0x10]
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x407259
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esi + 0xe8]
push ecx
lea edx, [esp + 0x14]
push str._sGameInfo_run.vbs
push edx
call fcn.0040de30
mov edi, dword [esp + 0x1c]
add esp, 0xc
push edi
call ebp
test eax, eax
je 0x4072b5
push 0x103
lea eax, [esp + 0x31]
push 0
push eax
mov byte [esp + 0x38], 0
call fcn.00507960
add esp, 0xc
push edi
push str.wscript___s_
lea edx, [esp + 0x34]
call fcn.0040cd80
add esp, 8
push 1
lea ecx, [esp + 0x30]
push ecx
call dword [sym.imp.KERNEL32.dll_WinExec]
mov edx, dword [esi + 0xe8]
push edx
lea eax, [esp + 0x14]
push str._si8reg.reg
push eax
call fcn.0040de30
mov ebp, dword [esp + 0x1c]
add esp, 0xc
push ebp
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x4073a9
mov ecx, dword [esi + 0xe8]
push ecx
lea edx, [esp + 0x24]
push str._sGameInfoi8reg.reg
push edx
call fcn.0040de30
mov ebx, dword [esp + 0x2c]
add esp, 0xc
push 0x5c
push ebx
call fcn.00506452
add esp, 8
test eax, eax
jne 0x407312
or eax, 0xffffffff
jmp 0x407314
sub eax, ebx
push eax
push 0
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0x2c]
call fcn.0040a5b0
mov byte [esp + 0x140], 0x11
mov edi, dword [esp + 0x18]
mov eax, dword [edi - 8]
mov ecx, 1
sub ecx, dword [edi - 4]
sub eax, 0x104
or eax, ecx
jge 0x407357
push 0x104
lea ecx, [esp + 0x1c]
call fcn.0040e0f0
mov edi, dword [esp + 0x18]
mov ecx, edi
call fcn.0040a1f0
mov eax, dword [edi - 8]
push eax
push edi
call fcn.00505327
add esp, 8
test eax, eax
jl 0x4073e5
cmp eax, dword [edi - 8]
jg 0x4073e5
push 0
push ebx
mov dword [edi - 0xc], eax
push ebp
mov byte [eax + edi], 0
call dword [sym.imp.KERNEL32.dll_CopyFileA]
add edi, 0xfffffff0
mov byte [esp + 0x140], 1
lea ecx, [edi + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4073a9
mov ecx, dword [edi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push edi
call edx
mov eax, dword [esi + 0xe8]
push eax
lea ecx, [esp + 0x14]
push str._si8bat.bat
push ecx
call fcn.0040de30
mov edi, dword [esp + 0x1c]
add esp, 0xc
push edi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x407435
push 0x5c
push edi
call fcn.00506452
add esp, 8
test eax, eax
jne 0x4073ef
or eax, 0xffffffff
jmp 0x4073f1
push 0x80070057
call fcn.0040e230
sub eax, edi
push eax
push 0
lea edx, [esp + 0x1c]
push edx
lea ecx, [esp + 0x1c]
call fcn.0040a5b0
mov ebx, dword [esp + 0x14]
push 0
push ebx
push 0
push edi
push str.open
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteA]
lea eax, [ebx - 0x10]
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x407435
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esi + 0xe8]
push ecx
lea edx, [esp + 0x14]
push str._si8vbs.vbs
push edx
call fcn.0040de30
mov edi, dword [esp + 0x1c]
add esp, 0xc
push edi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x407495
push 0x103
lea eax, [esp + 0x31]
push 0
push eax
mov byte [esp + 0x38], 0
call fcn.00507960
add esp, 0xc
push edi
push str.wscript___s_
lea edx, [esp + 0x34]
call fcn.0040cd80
add esp, 8
push 1
lea ecx, [esp + 0x30]
push ecx
call dword [sym.imp.KERNEL32.dll_WinExec]
mov ecx, esi
call fcn.00407520
mov byte [esp + 0x140], 0
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4074c4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [edi - 0x10]
mov dword [esp + 0x140], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4074eb
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 1
mov ecx, dword [esp + 0x138]
mov dword fs:[0], ecx
pop ecx
pop edi
pop ebp
pop ebx
mov ecx, dword [esp + 0x124]
xor ecx, esp
call fcn.005043e7
add esp, 0x134
ret