Function at 0x409f16
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, 0x4a1e2e
call fcn.00481d3a
xor edi, edi
mov esi, 0x206
push esi
lea eax, [ebp + 2]
mov ebx, ecx
push edi
push eax
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x10], edi
mov word [ebp], di
call fcn.0047e7d0
push esi
lea eax, [ebp + 0x20a]
push edi
push eax
mov word [ebp + 0x208], 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]
push eax
push edi
push edi
push 0x23
push edi
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
mov esi, 0x104
jge 0x409fb5
push esi
lea eax, [ebp]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
test eax, eax
je 0x40a15e
lea eax, [ebp]
push eax
call fcn.0047ba0d
cmp word [ebp + eax*2 - 2], 0x5c
pop ecx
jne 0x409fd9
lea eax, [ebp]
push eax
call fcn.0047ba0d
cmp word [ebp + eax*2 - 2], 0x2f
pop ecx
je 0x409feb
push 0x4ac26c
lea eax, [ebp]
push esi
push eax
call fcn.0047e6e5
add esp, 0xc
push 0xffffffffffffffff
lea eax, [ebp]
push eax
lea eax, [ebp + 0x208]
push esi
push eax
call fcn.0047f26d
push str.KingsoftKISUser.DAT
lea eax, [ebp + 0x208]
push esi
push eax
call fcn.0047e6e5
push 0xffffffffffffffff
push ebx
lea eax, [ebp + 0x410]
push esi
push eax
call fcn.0047f26d
mov ebx, str.PassPort_
push ebx
lea eax, [ebp + 0x410]
push esi
push eax
call fcn.0047e6e5
add esp, 0x38
lea eax, [ebp + 0x410]
push eax
lea ecx, [ebp - 0x10]
call fcn.00401640
lea ecx, [ebp - 0x10]
mov dword [ebp - 4], edi
call fcn.0042e810
or dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x10]
add ecx, 0xfffffff0
call fcn.00401325
push str.User.DAT
lea eax, [ebp + 0x410]
push esi
push eax
call fcn.0047e6e5
mov edi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
add esp, 0xc
lea eax, [ebp + 0x208]
push eax
call edi
test eax, eax
je 0x40a09d
push 0
lea eax, [ebp + 0x410]
push eax
lea eax, [ebp + 0x208]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
push 0xffffffffffffffff
lea eax, [ebp]
push eax
lea eax, [ebp + 0x208]
push esi
push eax
call fcn.0047f26d
push str.KingsoftKIS_
lea eax, [ebp + 0x208]
push esi
push eax
call fcn.0047e6e5
push str.Log.DAT
lea eax, [ebp + 0x208]
push esi
push eax
call fcn.0047e6e5
push 0xffffffffffffffff
push dword [ebp - 0x18]
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, 0x44
lea eax, [ebp + 0x410]
push eax
lea ecx, [ebp - 0x14]
call fcn.00401640
xor ebx, ebx
inc ebx
lea ecx, [ebp - 0x14]
mov dword [ebp - 4], ebx
call fcn.0042e810
or dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x14]
add ecx, 0xfffffff0
call fcn.00401325
push str.Log.DAT
lea eax, [ebp + 0x410]
push esi
push eax
call fcn.0047e6e5
add esp, 0xc
lea eax, [ebp + 0x208]
push eax
call edi
test eax, eax
je 0x40a15b
push 0
lea eax, [ebp + 0x410]
push eax
lea eax, [ebp + 0x208]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
mov dword [ebp - 0x10], ebx
call fcn.00428e69
mov eax, dword [ebp - 0x10]
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