Function at 0x403dd0
Capabilities:
Check if file exists
Create directory
Get common file path

Disassembly:
sub esp, 0x474
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0x470], eax
mov eax, dword [esp + 0x480]
push ebx
push ebp
push esi
push edi
xor edi, edi
push 0x206
lea ecx, [esp + 0x27e]
push edi
push ecx
mov dword [esp + 0x40], eax
mov word [esp + 0x284], di
call fcn.004028c0
add esp, 0xc
lea esi, [esp + 0x38]
call fcn.00401000
mov edx, dword [0x406094]
mov eax, dword [edx + 0xc]
mov ecx, 0x406094
call eax
push 0x104
lea ecx, [esp + 0x27c]
push ecx
lea esi, [eax + 0x10]
push edi
mov dword [esp + 0x1c], esi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea edx, [esp + 0x278]
push edx
call dword [sym.imp.SHLWAPI.dll_PathStripPathW]
push 0x208
lea eax, [esp + 0x72]
push edi
push eax
mov word [esp + 0x78], di
call fcn.004028c0
add esp, 0xc
push edi
push 0x23
lea ecx, [esp + 0x74]
push ecx
push edi
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
test eax, eax
je 0x4042ec
mov edi, dword [sym.imp.SHLWAPI.dll_PathAppendW]
push str.Kingsoft
lea edx, [esp + 0x70]
push edx
call edi
mov ebx, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
lea eax, [esp + 0x6c]
push eax
call ebx
test eax, eax
mov ebp, dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
jne 0x403ecf
push 0
lea ecx, [esp + 0x70]
push ecx
call ebp
test eax, eax
jne 0x403ecf
lea eax, [esi - 0x10]
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jmp 0x4042fc
push 0x4052e4
lea ecx, [esp + 0x70]
push ecx
call edi
lea edx, [esp + 0x6c]
push edx
call ebx
test eax, eax
jne 0x403ef6
push eax
lea eax, [esp + 0x70]
push eax
call ebp
test eax, eax
je 0x4042ec
push str.kvipsetup
lea ecx, [esp + 0x70]
push ecx
call edi
lea edx, [esp + 0x6c]
push edx
call ebx
test eax, eax
jne 0x403f1d
push eax
lea eax, [esp + 0x70]
push eax
call ebp
test eax, eax
je 0x4042ec
lea ecx, [esp + 0x278]
push ecx
push 0x405300
lea eax, [esp + 0x74]
lea edi, [esp + 0x20]
call fcn.00401090
lea edi, [esp + 0x24]
call fcn.00401250
add esp, 4
lea edi, [esp + 0x2c]
call fcn.00401250
add esp, 4
lea edi, [esp + 0x10]
call fcn.00401110
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x403f78
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
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 0x403f98
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
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 0x403fb8
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push ecx
mov eax, 0x405304
mov edi, esp
call fcn.00401090
mov edi, dword [esp + 0x14]
add edi, 0xfffffff0
push ecx
mov eax, edi
mov esi, esp
mov dword [esp + 0x18], edi
call fcn.00401600
add eax, 0x10
mov dword [esi], eax
call fcn.00403ab0
add esp, 8
test eax, eax
je 0x4042d1
mov edx, dword [0x406094]
mov eax, dword [edx + 0xc]
mov ecx, 0x406094
mov dword [esp + 0x1c], 0
call eax
mov edx, dword [0x406094]
add eax, 0x10
mov dword [esp + 0x14], eax
mov eax, dword [edx + 0xc]
mov ecx, 0x406094
call eax
mov edx, dword [0x406094]
add eax, 0x10
mov dword [esp + 0x18], eax
mov eax, dword [edx + 0xc]
mov ecx, 0x406094
call eax
mov edx, dword [0x406094]
lea ebp, [eax + 0x10]
mov eax, dword [edx + 0xc]
mov ecx, 0x406094
mov dword [esp + 0x28], ebp
call eax
mov edx, dword [0x406094]
add eax, 0x10
mov dword [esp + 0x24], eax
mov eax, dword [edx + 0xc]
mov ecx, 0x406094
call eax
add eax, 0x10
push 0x67
mov dword [esp + 0x24], eax
call fcn.00401d00
mov ecx, eax
add esp, 4
test ecx, ecx
je 0x404089
lea edx, [esp + 0x14]
push edx
mov eax, 0x67
call fcn.00401390
lea ebx, [esp + 0x14]
mov edi, 0x40530c
lea esi, [esp + 0x30]
call fcn.004012c0
mov ebx, eax
mov edi, 0x405310
lea esi, [esp + 0x2c]
call fcn.004012c0
lea edi, [esp + 0x14]
call fcn.00401110
mov eax, dword [esp + 0x2c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4040d4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x30]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4040f4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edx, dword [esp + 0x14]
lea esi, [esp + 0x1c]
call fcn.00401e60
test eax, eax
jne 0x404204
push 0x69
call fcn.00401d00
mov ecx, eax
add esp, 4
test ecx, ecx
je 0x404128
lea edx, [esp + 0x24]
push edx
mov eax, 0x69
call fcn.00401390
push 0x6a
call fcn.00401d00
mov ecx, eax
add esp, 4
test ecx, ecx
je 0x404147
lea eax, [esp + 0x20]
push eax
mov eax, 0x6a
call fcn.00401390
mov ecx, dword [esp + 0x24]
cmp dword [ecx - 0xc], 0
jne 0x40416b
mov ecx, 0x405340
call fcn.00401460
mov ebx, eax
push 0x405340
lea eax, [esp + 0x28]
call fcn.00401510
mov edx, dword [esp + 0x20]
cmp dword [edx - 0xc], 0
jne 0x40418f
mov ecx, 0x405344
call fcn.00401460
mov ebx, eax
push 0x405344
lea eax, [esp + 0x24]
call fcn.00401510
lea eax, [esp + 0x20]
push eax
push 0x405348
lea eax, [esp + 0x2c]
lea edi, [esp + 0x34]
call fcn.00401250
add esp, 4
mov ebx, eax
lea esi, [esp + 0x34]
call fcn.004011e0
add esp, 4
lea edi, [esp + 0x28]
call fcn.00401110
mov eax, esi
call fcn.004010f0
lea eax, [esp + 0x2c]
call fcn.004010f0
push 0x68
call fcn.00401d00
mov ecx, eax
add esp, 4
test ecx, ecx
je 0x4041ef
lea edx, [esp + 0x18]
push edx
mov eax, 0x68
call fcn.00401390
mov eax, dword [esp + 0x18]
mov ebp, dword [esp + 0x28]
push eax
lea ecx, [esp + 0x20]
push ecx
mov esi, ebp
call fcn.00401e20
mov edx, dword [esp + 0x34]
mov eax, dword [esp + 0x10]
push edx
push ecx
mov esi, esp
call fcn.00401600
add eax, 0x10
mov dword [esi], eax
call fcn.00403c20
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
add esp, 8
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x404242
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
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 0x404262
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [ebp - 0x10]
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40427e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
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 0x40429e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
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 0x4042be
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x4042cd
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edi, dword [esp + 0x10]
lea ecx, [edi + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x404308
mov ecx, dword [edi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push edi
call edx
jmp 0x404308
lea eax, [esi - 0x10]
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x404308
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea edi, [esp + 0x3c]
call fcn.00401820
mov eax, dword [esp + 0x38]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x404331
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x480]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
xor eax, eax
call fcn.004028a9
add esp, 0x474
ret 0x10