Function at 0x422882
Capabilities:
Check if file exists
Copy file
Get common file path
Read .ini file
Set current directory

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4c83c7
mov eax, dword fs:[0]
push eax
push ecx
mov eax, 0x2094
call fcn.004933d0
mov eax, dword [0x4f51d0]
xor eax, esp
mov dword [esp + 0x2090], eax
push ebx
push esi
push edi
mov eax, dword [0x4f51d0]
xor eax, esp
push eax
lea eax, [esp + 0x20a8]
mov dword fs:[0], eax
mov esi, ecx
mov dword [esp + 0x10], esi
call fcn.004223e6
mov ebx, 0x208
push ebx
lea eax, [esp + 0x20]
push 0
push eax
call fcn.00492200
add esp, 0xc
call fcn.0045db63
mov edi, dword [sym.imp.SHLWAPI.dll_PathAppendW]
cmp eax, 2
lea eax, [esp + 0x1c]
jle 0x42290c
push dword [esi + 0xc]
push eax
call edi
push str.360safebox
lea eax, [esp + 0x20]
jmp 0x42290f
push dword [esi + 0x58]
push eax
call edi
push ebx
lea eax, [esp + 0x228]
push 0
push eax
call fcn.00492200
add esp, 0xc
push dword [esi + 0xc]
lea eax, [esp + 0x228]
push eax
call edi
push str.Safebox6.0
lea eax, [esp + 0x228]
push eax
call edi
push 0x4dacd0
lea eax, [esp + 0x228]
push eax
call edi
lea esi, [esp + 0x224]
call fcn.0045af1b
push str.360Game.ini
mov eax, esi
push eax
call edi
push ebx
lea eax, [esp + 0x638]
push 0
push eax
call fcn.00492200
add esp, 0xc
lea eax, [esp + 0x1c]
push eax
lea eax, [esp + 0x638]
push eax
call edi
push 0x4dacf4
lea eax, [esp + 0x638]
push eax
call edi
mov esi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
lea eax, [esp + 0x634]
push eax
call esi
test eax, eax
je 0x422ae7
push ebx
lea eax, [esp + 0x1880]
push 0
push eax
call fcn.00492200
add esp, 0xc
push ebx
lea eax, [esp + 0x1c90]
push 0
push eax
call fcn.00492200
add esp, 0xc
push ebx
lea eax, [esp + 0x840]
push 0
push eax
call fcn.00492200
add esp, 0xc
lea eax, [esp + 0x634]
push eax
push 0x104
lea eax, [esp + 0x1884]
push eax
push 0x4d84dc
push str.DownDir
push str.Download
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea eax, [esp + 0x634]
push eax
push 0x104
lea eax, [esp + 0x1c94]
push eax
push 0x4d84dc
push str.InstallDir
push str.Download
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea eax, [esp + 0x634]
push eax
push 0x104
lea eax, [esp + 0x844]
push eax
push 0x4d84dc
push str.QuickScan
push str.scan
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
cmp word [esp + 0x187c], 0
je 0x422a91
lea eax, [esp + 0x224]
push eax
lea eax, [esp + 0x1880]
push eax
push str.gamedownloadpath
push str.setting
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
cmp word [esp + 0x1c8c], 0
je 0x422abc
lea eax, [esp + 0x224]
push eax
lea eax, [esp + 0x1c90]
push eax
push str.gameinstallpath
push str.setting
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
cmp word [esp + 0x83c], 0
je 0x422ae7
lea eax, [esp + 0x224]
push eax
lea eax, [esp + 0x840]
push eax
push str.ScanFlag
push str.setting
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
push ebx
lea eax, [esp + 0x1060]
push 0
push eax
call fcn.00492200
mov eax, dword [esp + 0x1c]
add esp, 0xc
push dword [eax + 0xc]
lea eax, [esp + 0x1060]
push eax
call edi
push str.Safebox6.0
lea eax, [esp + 0x1060]
push eax
call edi
push str.datagamecenter.db
lea eax, [esp + 0x1060]
push eax
call edi
push ebx
lea eax, [esp + 0xc50]
push 0
push eax
call fcn.00492200
add esp, 0xc
lea eax, [esp + 0x1c]
push eax
lea eax, [esp + 0xc50]
push eax
call edi
push 0x4dada8
lea eax, [esp + 0xc50]
push eax
call edi
lea eax, [esp + 0xc4c]
push eax
call esi
test eax, eax
je 0x422b80
push 0
lea eax, [esp + 0x1060]
push eax
lea eax, [esp + 0xc54]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
push ebx
lea eax, [esp + 0x1678]
push 0
push eax
call fcn.00492200
mov eax, dword [esp + 0x1c]
add esp, 0xc
push dword [eax + 0xc]
lea eax, [esp + 0x1678]
push eax
call edi
push str.Safebox6.0
lea eax, [esp + 0x1678]
push eax
call edi
push str.datagameapp.db
lea eax, [esp + 0x1678]
push eax
call edi
push ebx
lea eax, [esp + 0x1470]
push 0
push eax
call fcn.00492200
add esp, 0xc
lea eax, [esp + 0x1c]
push eax
lea eax, [esp + 0x1470]
push eax
call edi
push 0x4dade4
lea eax, [esp + 0x1470]
push eax
call edi
lea eax, [esp + 0x146c]
push eax
call esi
test eax, eax
je 0x422c19
push 0
lea eax, [esp + 0x1678]
push eax
lea eax, [esp + 0x1474]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
push ebx
lea eax, [esp + 0xe58]
push 0
push eax
call fcn.00492200
mov eax, dword [esp + 0x1c]
add esp, 0xc
push dword [eax + 0x58]
lea eax, [esp + 0xe58]
push eax
call edi
push 0x4dadfc
lea eax, [esp + 0xe58]
push eax
call edi
push ebx
lea eax, [esp + 0x430]
push 0
push eax
call fcn.00492200
mov eax, dword [esp + 0x1c]
add esp, 0xc
push dword [eax + 0xc]
lea eax, [esp + 0x430]
push eax
call edi
push str.Safebox6.0
lea eax, [esp + 0x430]
push eax
call edi
push 0x4dacd0
lea eax, [esp + 0x430]
push eax
call edi
push str.pngico
lea eax, [esp + 0x430]
push eax
call edi
lea eax, [esp + 0xe54]
push eax
call esi
test eax, eax
je 0x422cd0
lea eax, [esp + 0x42c]
push eax
call fcn.0045ad71
pop ecx
lea eax, [esp + 0x42c]
push eax
lea eax, [esp + 0xe58]
push eax
call fcn.0045a916
pop ecx
pop ecx
push ebx
lea eax, [esp + 0x1268]
push 0
push eax
call fcn.00492200
add esp, 0xc
lea eax, [esp + 0x1c]
push eax
lea eax, [esp + 0x1268]
push eax
call edi
push 0x4dae18
lea eax, [esp + 0x1268]
push eax
call edi
push ebx
lea eax, [esp + 0x1e98]
push 0
push eax
call fcn.00492200
add esp, 0xc
lea eax, [esp + 0x1c]
push eax
lea eax, [esp + 0x1e98]
push eax
call edi
push str.safeboxdatagameapp.dat
lea eax, [esp + 0x1e98]
push eax
call edi
push ebx
lea eax, [esp + 0xa48]
push 0
push eax
call fcn.00492200
mov eax, dword [esp + 0x1c]
add esp, 0xc
push dword [eax + 0xc]
lea eax, [esp + 0xa48]
push eax
call edi
push str.Safebox6.0
lea eax, [esp + 0xa48]
push eax
call edi
push 0x4dacd0
lea eax, [esp + 0xa48]
push eax
call edi
push str.360uyxe.db
lea eax, [esp + 0xa48]
push eax
call edi
push ebx
lea eax, [esp + 0x1a88]
push 0
push eax
call fcn.00492200
mov eax, dword [esp + 0x1c]
add esp, 0xc
push dword [eax + 0x50]
lea eax, [esp + 0x1a88]
push eax
call edi
push str.GameRecord.dll
lea eax, [esp + 0x1a88]
push eax
call edi
lea eax, [esp + 0x1264]
push eax
call esi
test eax, eax
je 0x422e54
push ebx
lea eax, [esp + 0x840]
push 0
push eax
call fcn.00492200
add esp, 0xc
lea eax, [esp + 0x83c]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov eax, dword [esp + 0x10]
push dword [eax + 0x50]
mov esi, dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
call esi
lea eax, [esp + 0xa44]
push eax
lea eax, [esp + 0x1a88]
push eax
lea eax, [esp + 0x1c]
push eax
call fcn.0041f592
and dword [esp + 0x20b0], 0
lea eax, [esp + 0x1e94]
push eax
lea eax, [esp + 0x1268]
push eax
lea ecx, [esp + 0x1c]
call fcn.0041f630
lea eax, [esp + 0x83c]
push eax
call esi
or dword [esp + 0x20b0], 0xffffffff
lea eax, [esp + 0x14]
push eax
call fcn.0041f5fb
mov ecx, dword [esp + 0x20a8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x2090]
xor ecx, esp
call fcn.0048c64c
mov esp, ebp
pop ebp
ret