Function at 0x40a189
Capabilities:
Check if file exists
Copy file
Get common file path

Disassembly:
push ebp
sub esp, 0x618
lea ebp, [esp - 4]
mov eax, dword [0x4d0620]
xor eax, ebp
mov dword [ebp + 0x618], eax
push 0xc
mov eax, 0x4a1df6
call fcn.00481d3a
mov eax, dword [ebp + 0x624]
mov esi, 0x206
xor edi, edi
push esi
mov dword [ebp - 0x10], eax
lea eax, [ebp + 0x20a]
push edi
push eax
mov word [ebp + 0x208], di
call fcn.0047e7d0
push esi
lea eax, [ebp + 2]
push edi
push eax
mov word [ebp], di
call fcn.0047e7d0
push esi
lea eax, [ebp + 0x412]
push edi
push eax
mov word [ebp + 0x410], di
call fcn.0047e7d0
add esp, 0x24
call fcn.00428e38
lea eax, [ebp + 0x208]
push eax
push edi
push edi
push 0x23
push edi
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
mov esi, 0x104
jge 0x40a22f
push esi
lea eax, [ebp + 0x208]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
test eax, eax
je 0x40a3c4
lea eax, [ebp + 0x208]
push eax
call fcn.0047ba0d
cmp word [ebp + eax*2 + 0x206], 0x5c
pop ecx
jne 0x40a25f
lea eax, [ebp + 0x208]
push eax
call fcn.0047ba0d
cmp word [ebp + eax*2 + 0x206], 0x2f
pop ecx
je 0x40a274
push 0x4ac26c
lea eax, [ebp + 0x208]
push esi
push eax
call fcn.0047e6e5
add esp, 0xc
push 0xffffffffffffffff
lea eax, [ebp + 0x208]
push eax
lea eax, [ebp + 0x410]
push esi
push eax
call fcn.0047f26d
mov ebx, str.KingsoftKIS_
push ebx
lea eax, [ebp + 0x410]
push esi
push eax
call fcn.0047e6e5
add esp, 0x1c
lea eax, [ebp + 0x410]
push eax
lea ecx, [ebp - 0x14]
call fcn.00401640
lea ecx, [ebp - 0x14]
mov dword [ebp - 4], edi
call fcn.0042e810
or dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x14]
add ecx, 0xfffffff0
call fcn.00401325
push str.User.DAT
lea eax, [ebp + 0x410]
push esi
push eax
call fcn.0047e6e5
push 0xffffffffffffffff
push dword [ebp - 0x10]
lea eax, [ebp]
push esi
push eax
call fcn.0047f26d
push str.PassPortUser.DAT
lea eax, [ebp]
push esi
push eax
call fcn.0047e6e5
mov edi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
add esp, 0x28
lea eax, [ebp]
push eax
call edi
test eax, eax
je 0x40a31f
push 0
lea eax, [ebp + 0x410]
push eax
lea eax, [ebp]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
push 0xffffffffffffffff
lea eax, [ebp + 0x208]
push eax
lea eax, [ebp + 0x410]
push esi
push eax
call fcn.0047f26d
push ebx
lea eax, [ebp + 0x410]
push esi
push eax
call fcn.0047e6e5
add esp, 0x1c
lea eax, [ebp + 0x410]
push eax
lea ecx, [ebp - 0x18]
call fcn.00401640
xor ebx, ebx
inc ebx
lea ecx, [ebp - 0x18]
mov dword [ebp - 4], ebx
call fcn.0042e810
or dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x18]
add ecx, 0xfffffff0
call fcn.00401325
push str.Log.DAT
lea eax, [ebp + 0x410]
push esi
push eax
call fcn.0047e6e5
push 0xffffffffffffffff
push dword [ebp - 0x10]
lea eax, [ebp]
push esi
push eax
call fcn.0047f26d
push str.PassPortLog.DAT
lea eax, [ebp]
push esi
push eax
call fcn.0047e6e5
add esp, 0x28
lea eax, [ebp]
push eax
call edi
test eax, eax
je 0x40a3c2
push 0
lea eax, [ebp + 0x410]
push eax
lea eax, [ebp]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
mov edi, ebx
call fcn.00428e69
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x618]
xor ecx, ebp
call fcn.0047b9fe
add ebp, 0x61c
leave
ret