Function at 0x40d24c
Capabilities:
Clear file content
Timestomp file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x42e068]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, ecx
mov dword [ebp - 0x18], esi
call fcn.00405172
mov eax, dword [0x42e888]
push 0
push dword [esi + 0x1c]
push dword [esi + 0x18]
mov edx, dword [eax]
push eax
call dword [edx + 0x30]
mov ebx, eax
test ebx, ebx
js 0x40d4ab
push edi
xor edx, edx
lea edi, [esi + 0x28]
cmp dword [esi + 0x14], edx
mov ecx, 0x28000080
push edx
mov eax, 0x8000080
mov dword [ebp - 0x20], edi
cmove eax, ecx
mov ebx, edx
push eax
push 4
push edx
push edx
push 0x40000000
push edi
mov dword [ebp - 0x24], eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esi + 0x250], eax
cmp eax, 0xffffffff
jne 0x40d334
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 3
jne 0x40d31e
push edi
call fcn.0040e19a
mov edi, eax
xor eax, eax
push eax
push dword [ebp - 0x20]
movzx esi, word [edi]
mov word [edi], ax
call fcn.0040e07b
mov ebx, eax
mov word [edi], si
test ebx, ebx
js 0x40d4aa
mov edi, dword [ebp - 0x20]
xor eax, eax
push eax
push dword [ebp - 0x24]
push 4
push eax
push eax
push 0x40000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, dword [ebp - 0x18]
mov dword [esi + 0x250], eax
cmp eax, 0xffffffff
jne 0x40d32c
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
test ebx, ebx
js 0x40d4aa
push edi
push str.opened_cache_file:__S
push 3
call fcn.00410f0b
add esp, 0xc
cmp dword [ebp + 8], 0
je 0x40d42b
mov edx, dword [esi + 0x240]
xor eax, eax
mov edi, dword [esi + 0x244]
cmp dword [esi + 0x14], eax
jne 0x40d37f
mov ecx, dword [0x42e88c]
add edx, ecx
adc edi, eax
sub edx, 1
sbb edi, eax
sub ecx, 1
not ecx
sbb eax, eax
and edx, ecx
not eax
and edi, eax
xor eax, eax
push eax
push eax
push edi
mov edi, dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
push edx
push dword [esi + 0x250]
call edi
test eax, eax
jne 0x40d3b1
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
test ebx, ebx
js 0x40d4aa
push dword [esi + 0x250]
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x40d3dd
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
test ebx, ebx
js 0x40d4aa
mov ecx, dword [esi + 0x23c]
mov eax, dword [esi + 0x238]
test ecx, ecx
jl 0x40d3f3
jg 0x40d401
test eax, eax
jne 0x40d401
xorps xmm0, xmm0
movlpd qword [ebp - 0x1c], xmm0
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
push 0
push 0
push ecx
push eax
push dword [esi + 0x250]
call edi
test eax, eax
jne 0x40d42b
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
test ebx, ebx
js 0x40d4aa
cmp dword [ebp + 0xc], 0
mov edi, dword [sym.imp.KERNEL32.dll_SetFileTime]
je 0x40d464
lea eax, [esi + 0x248]
push eax
push eax
push eax
push dword [esi + 0x250]
call edi
test eax, eax
jne 0x40d464
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
test ebx, ebx
js 0x40d4aa
cmp dword [ebp + 0x10], 0
je 0x40d4aa
lea eax, [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemTime]
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_SystemTimeToFileTime]
lea eax, [ebp - 0x1c]
push eax
push 0
push 0
push dword [esi + 0x250]
call edi
test eax, eax
jne 0x40d4aa
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
pop edi
mov ecx, dword [ebp - 4]
mov eax, ebx
pop esi
xor ecx, ebp
pop ebx
call fcn.004116b9
mov esp, ebp
pop ebp
ret 0xc