Function at 0x40c97d
Capabilities:
Check if file exists
Get file attributes
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2dc
mov eax, dword [0x4eb664]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
xor eax, eax
push 0x206
mov word [ebp - 0x234], ax
xor ebx, ebx
lea eax, [ebp - 0x232]
push ebx
push eax
mov dword [ebp - 0x2dc], ecx
call fcn.004921d0
lea eax, [ebp - 0x234]
push eax
mov ecx, str.kingsoftkiskcltpublic_kws.inf
call fcn.0040c3bc
add esp, 0x10
lea eax, [ebp - 0x234]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40cc6b
test al, 0x10
jne 0x40cc6b
push ebx
push 0x80
push 3
push ebx
push 1
push SysReAllocStringLen
lea eax, [ebp - 0x234]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x2d0], eax
cmp eax, 0xffffffff
je 0x40cc66
push edi
lea ecx, [ebp - 0x2d8]
push ecx
push eax
mov dword [ebp - 0x2d8], ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
cmp dword [ebp - 0x2d8], ebx
jne 0x40cc59
lea ecx, [edi - 4]
cmp ecx, 0x5f
ja 0x40cc59
push esi
push edi
call fcn.0048eb44
mov esi, eax
mov eax, edi
imul eax, eax, 3
push eax
mov dword [ebp - 0x2cc], eax
call fcn.0048eb44
pop ecx
mov ebx, eax
pop ecx
mov dword [ebp - 0x2c8], ebx
test esi, esi
je 0x40cc58
test ebx, ebx
je 0x40cc58
push edi
push 0
push esi
call fcn.004921d0
push dword [ebp - 0x2cc]
push 0
push ebx
call fcn.004921d0
and dword [ebp - 0x2d4], 0
add esp, 0x18
lea eax, [ebp - 0x2d4]
push 0
push eax
push edi
push esi
push dword [ebp - 0x2d0]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40cc4a
cmp edi, dword [ebp - 0x2d4]
jne 0x40cc4a
cmp byte [esi], 0
je 0x40cb15
cmp byte [esi + 1], 0
jne 0x40cb15
push 3
lea eax, [ebp - 0x2c0]
push esi
lea ecx, [ebp - 0x2c4]
mov dword [ebp - 0x2c4], eax
call fcn.004045ee
mov ecx, dword [ebp - 0x2c4]
lea edx, [ebp - 0x2c8]
call fcn.0041ca69
mov edi, eax
lea eax, [ebp - 0x2c0]
cmp dword [ebp - 0x2c4], eax
je 0x40cb24
push dword [ebp - 0x2c4]
call fcn.0048f255
pop ecx
jmp 0x40cb24
lea edx, [ebp - 0x2c8]
mov ecx, esi
call fcn.0041ca69
mov edi, eax
mov ebx, dword [ebp - 0x2c8]
test edi, edi
je 0x40cc4a
and dword [ebp - 0x240], 0
xor ecx, ecx
xor edx, edx
xor eax, eax
mov dword [ebp - 0x23c], edx
mov dword [ebp - 0x2cc], ecx
mov dword [ebp - 0x238], ecx
test edi, edi
je 0x40cb7d
lea ecx, [ebp - 0x240]
cmp byte [eax + ebx], 0x26
jne 0x40cb66
mov dword [ecx], eax
add ecx, 4
inc eax
cmp eax, edi
jb 0x40cb5b
mov ecx, dword [ebp - 0x238]
mov edx, dword [ebp - 0x23c]
mov dword [ebp - 0x2cc], ecx
cmp dword [ebp - 0x240], 0
je 0x40cc4a
test edx, edx
je 0x40cc4a
test ecx, ecx
je 0x40cc4a
xor eax, eax
mov byte [ebp - 0x18], 0
lea edi, [ebp - 0x17]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, dword [ebp - 0x240]
xor eax, eax
mov byte [ebp - 0x2c], 0
lea edi, [ebp - 0x2b]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, edx
sub eax, ecx
sub eax, 6
push eax
lea eax, [ecx + 6]
add eax, ebx
push eax
lea ecx, [ebp - 0x18]
call fcn.0040c370
mov ecx, dword [ebp - 0x23c]
mov eax, dword [ebp - 0x2cc]
sub eax, ecx
sub eax, 6
push eax
lea eax, [ecx + 6]
add eax, ebx
push eax
lea ecx, [ebp - 0x2c]
call fcn.0040c370
xor eax, eax
push 0x62
push eax
mov word [ebp - 0x2a4], ax
lea eax, [ebp - 0x2a2]
push eax
call fcn.004921d0
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x2a4]
push str._S__S
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
lea eax, [ebp - 0x2a4]
push eax
call fcn.00405113
mov ecx, dword [ebp - 0x2dc]
add esp, 0x20
push eax
lea eax, [ebp - 0x2a4]
push eax
call fcn.0040509a
push esi
call fcn.0048eb4d
push ebx
call fcn.0048eb4d
pop ecx
pop ecx
pop esi
push dword [ebp - 0x2d0]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
xor eax, eax
inc eax
jmp 0x40cc6d
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.0048f059
leave
ret