Function at 0x4108ac
Capabilities:
Clear file content
Timestomp file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x42104c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, ecx
mov dword [ebp - 0x18], esi
call fcn.00408908
mov eax, dword [0x421e3c]
mov edx, dword [eax]
push 0
push dword [esi + 0x1c]
push dword [esi + 0x18]
push eax
call dword [edx + 0x30]
mov ebx, eax
test ebx, ebx
js 0x410b2b
xor ecx, ecx
mov eax, 0x8000080
mov ebx, ecx
mov dword [ebp - 0x24], eax
cmp dword [esi + 0x14], ecx
jne 0x4108fe
mov eax, 0x28000080
mov dword [ebp - 0x24], eax
push edi
push ecx
push eax
push 4
push ecx
push ecx
lea edi, [esi + 0x28]
push 0x40000000
push edi
mov dword [ebp - 0x20], edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esi + 0x250], eax
cmp eax, 0xffffffff
jne 0x41099c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
cmp ebx, 3
jne 0x410984
push edi
call fcn.004171b2
mov edi, eax
movzx esi, word [edi]
xor eax, eax
push eax
push dword [ebp - 0x20]
mov word [edi], ax
call fcn.004172b0
mov ebx, eax
mov word [edi], si
test ebx, ebx
js 0x410b2a
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 0x410994
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
test ebx, ebx
jle 0x410996
and ebx, 0xffff
or ebx, 0x80070000
test ebx, ebx
js 0x410b2a
push edi
push 0x402180
push 3
call fcn.004196b7
add esp, 0xc
cmp dword [ebp + 8], 0
je 0x410aa3
mov edx, dword [esi + 0x240]
mov edi, dword [esi + 0x244]
xor eax, eax
cmp dword [esi + 0x14], eax
jne 0x4109e7
mov ecx, dword [0x421e40]
add edx, ecx
adc edi, eax
sub edx, 1
sbb edi, eax
sub ecx, 1
sbb eax, eax
not eax
not ecx
and edx, ecx
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 0x410a1d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
test ebx, ebx
jle 0x410a17
and ebx, 0xffff
or ebx, 0x80070000
test ebx, ebx
js 0x410b2a
push dword [esi + 0x250]
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x410a4d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
test ebx, ebx
jle 0x410a47
and ebx, 0xffff
or ebx, 0x80070000
test ebx, ebx
js 0x410b2a
mov ecx, dword [esi + 0x23c]
mov eax, dword [esi + 0x238]
test ecx, ecx
jl 0x410a63
jg 0x410a71
test eax, eax
jne 0x410a71
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 0x410aa3
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
test ebx, ebx
jle 0x410a9d
and ebx, 0xffff
or ebx, 0x80070000
test ebx, ebx
js 0x410b2a
cmp dword [ebp + 0xc], 0
mov edi, dword [sym.imp.KERNEL32.dll_SetFileTime]
je 0x410ae0
lea eax, [esi + 0x248]
push eax
push eax
push eax
push dword [esi + 0x250]
call edi
test eax, eax
jne 0x410ae0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
test ebx, ebx
jle 0x410ade
and ebx, 0xffff
or ebx, 0x80070000
test ebx, ebx
js 0x410b2a
cmp dword [ebp + 0x10], 0
je 0x410b2a
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 0x410b2a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
test ebx, ebx
jle 0x410b2a
and ebx, 0xffff
or ebx, 0x80070000
pop edi
mov ecx, dword [ebp - 4]
pop esi
mov eax, ebx
xor ecx, ebp
pop ebx
call fcn.00410f5c
leave
ret 0xc