Function at 0x405ea6
Capabilities:
Delete file
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x487b19
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
mov eax, 0x1254
call fcn.00482980
push esi
push edi
lea edi, [ebp - 0x1260]
mov ecx, 0x495
mov eax, 0xcccccccc
rep stosd dword es:[edi], eax
mov dword [ebp - 0x125c], 0
mov dword [ebp - 0x120], 0
mov al, byte [0x4a199c]
mov byte [ebp - 0x224], al
mov ecx, 0x40
xor eax, eax
lea edi, [ebp - 0x223]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov cl, byte [0x4a19a0]
mov byte [ebp - 0x11c], cl
mov ecx, 0x40
xor eax, eax
lea edi, [ebp - 0x11b]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov dword [ebp - 0x254], 0
mov esi, esp
lea ecx, [ebp - 0x248]
call dword [sym.imp.Engine.dll_public:_void___thiscall_KPakFile::constructor_void_]
cmp esi, esp
call sub.MSVCRTD.dll__chkesp
mov dword [ebp - 4], 0
mov dword [ebp - 0x24c], 0
mov dword [ebp - 0x258], 0
mov esi, esp
lea ecx, [ebp - 0x18]
call dword [sym.imp.Engine.dll_public:_void___thiscall_KFile::constructor_void_]
cmp esi, esp
call sub.MSVCRTD.dll__chkesp
mov byte [ebp - 4], 1
mov dword [ebp - 0x250], 0
mov edx, dword [ebp + 0xc]
mov dword [edx], 0
cmp dword [ebp + 8], 0
jne 0x405f99
jmp 0x406174
mov esi, esp
lea eax, [ebp - 0x224]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
cmp esi, esp
call sub.MSVCRTD.dll__chkesp
mov dword [ebp - 0x120], eax
cmp dword [ebp - 0x120], 0
jne 0x405fc8
jmp 0x406174
mov esi, esp
lea ecx, [ebp - 0x11c]
push ecx
push 0
push str.KSG_
lea edx, [ebp - 0x224]
push edx
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
cmp esi, esp
call sub.MSVCRTD.dll__chkesp
mov dword [ebp - 0x120], eax
cmp dword [ebp - 0x120], 0
jne 0x406000
jmp 0x406174
mov esi, esp
lea eax, [ebp - 0x11c]
push eax
lea ecx, [ebp - 0x18]
call dword [sym.imp.Engine.dll_public:_int___thiscall_KFile::Create_char__]
cmp esi, esp
call sub.MSVCRTD.dll__chkesp
mov dword [ebp - 0x120], eax
cmp dword [ebp - 0x120], 0
jne 0x40602d
jmp 0x406174
mov dword [ebp - 0x250], 1
mov esi, esp
mov ecx, dword [ebp + 8]
push ecx
lea ecx, [ebp - 0x248]
call dword [sym.imp.Engine.dll_public:_int___thiscall_KPakFile::Open_char_const__]
cmp esi, esp
call sub.MSVCRTD.dll__chkesp
mov dword [ebp - 0x120], eax
cmp dword [ebp - 0x120], 0
jne 0x406064
jmp 0x406174
mov dword [ebp - 0x24c], 1
mov esi, esp
lea ecx, [ebp - 0x248]
call dword [sym.imp.Engine.dll_public:_unsigned_long_int___thiscall_KPakFile::Size_void_]
cmp esi, esp
call sub.MSVCRTD.dll__chkesp
mov dword [ebp - 0x258], eax
cmp dword [ebp - 0x258], 0
jle 0x4060f8
mov esi, esp
push 0x1000
lea edx, [ebp - 0x1258]
push edx
lea ecx, [ebp - 0x248]
call dword [sym.imp.Engine.dll_public:_unsigned_long_int___thiscall_KPakFile::Read_void___unsigned_int_]
cmp esi, esp
call sub.MSVCRTD.dll__chkesp
mov dword [ebp - 0x254], eax
cmp dword [ebp - 0x254], 0
jne 0x4060c4
jmp 0x4060f8
mov esi, esp
mov eax, dword [ebp - 0x254]
push eax
lea ecx, [ebp - 0x1258]
push ecx
lea ecx, [ebp - 0x18]
call dword [sym.imp.Engine.dll_public:_unsigned_long_int___thiscall_KFile::Write_void___unsigned_long_int_]
cmp esi, esp
call sub.MSVCRTD.dll__chkesp
mov edx, dword [ebp - 0x258]
sub edx, dword [ebp - 0x254]
mov dword [ebp - 0x258], edx
jmp 0x406089
cmp dword [ebp - 0x24c], 0
je 0x406120
mov esi, esp
lea ecx, [ebp - 0x248]
call dword [sym.imp.Engine.dll_public:_void___thiscall_KPakFile::Close_void_]
cmp esi, esp
call sub.MSVCRTD.dll__chkesp
mov dword [ebp - 0x24c], 0
cmp dword [ebp - 0x250], 0
je 0x406145
mov esi, esp
lea ecx, [ebp - 0x18]
call dword [sym.imp.Engine.dll_public:_void___thiscall_KFile::Close_void_]
cmp esi, esp
call sub.MSVCRTD.dll__chkesp
mov dword [ebp - 0x250], 0
mov esi, esp
lea eax, [ebp - 0x11c]
push eax
call dword [sym.imp.USER32.dll_LoadCursorFromFileA]
cmp esi, esp
call sub.MSVCRTD.dll__chkesp
mov ecx, dword [ebp + 0xc]
mov dword [ecx], eax
mov edx, dword [ebp + 0xc]
cmp dword [edx], 0
jne 0x40616a
jmp 0x406174
mov dword [ebp - 0x125c], 1
cmp dword [ebp - 0x24c], 0
je 0x40619c
mov esi, esp
lea ecx, [ebp - 0x248]
call dword [sym.imp.Engine.dll_public:_void___thiscall_KPakFile::Close_void_]
cmp esi, esp
call sub.MSVCRTD.dll__chkesp
mov dword [ebp - 0x24c], 0
cmp dword [ebp - 0x250], 0
je 0x4061c1
mov esi, esp
lea ecx, [ebp - 0x18]
call dword [sym.imp.Engine.dll_public:_void___thiscall_KFile::Close_void_]
cmp esi, esp
call sub.MSVCRTD.dll__chkesp
mov dword [ebp - 0x250], 0
movsx eax, byte [ebp - 0x11c]
test eax, eax
je 0x4061e9
mov esi, esp
lea ecx, [ebp - 0x11c]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
cmp esi, esp
call sub.MSVCRTD.dll__chkesp
mov byte [ebp - 0x11c], 0
mov edx, dword [ebp - 0x125c]
mov dword [ebp - 0x1260], edx
mov byte [ebp - 4], 0
mov esi, esp
lea ecx, [ebp - 0x18]
call dword [sym.imp.Engine.dll_public:_void___thiscall_KFile::destructor_void_]
cmp esi, esp
call sub.MSVCRTD.dll__chkesp
mov dword [ebp - 4], 0xffffffff
mov esi, esp
lea ecx, [ebp - 0x248]
call dword [sym.imp.Engine.dll_public:_void___thiscall_KPakFile::destructor_void_]
cmp esi, esp
call sub.MSVCRTD.dll__chkesp
mov eax, dword [ebp - 0x1260]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
add esp, 0x1260
cmp ebp, esp
call sub.MSVCRTD.dll__chkesp
mov esp, ebp
pop ebp
ret