Function at 0x420bd8
Capabilities:
Clear file content

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
xor ebx, ebx
inc ebx
push dword [edi + 0x28]
call dword [sym.imp.KERNEL32.dll_SetEvent]
test eax, eax
jne 0x420c31
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x420c08
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x420c0f
mov esi, 0x80004005
push esi
push 0x204
push str.cabextract.cpp
call fcn.00403858
push str.Failed_to_set_operation_complete_event.
push esi
call fcn.0044041e
pop ecx
pop ecx
jmp 0x420faa
push 0xffffffffffffffff
push dword [edi + 0x24]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0xffffffff
jne 0x420c76
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x420c58
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x420c5f
mov esi, 0x80004005
push esi
push 0x20a
push str.cabextract.cpp
call fcn.00403858
push str.Failed_to_wait_for_begin_operation_event.
jmp 0x420c24
push dword [edi + 0x24]
call dword [sym.imp.KERNEL32.dll_ResetEvent]
test eax, eax
jne 0x420cbb
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x420c9a
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x420ca1
mov esi, 0x80004005
push esi
push 0x20f
push str.cabextract.cpp
call fcn.00403858
push str.Failed_to_reset_begin_operation_event.
jmp 0x420c24
mov eax, dword [edi + 0x2c]
sub eax, 1
je 0x420cf4
sub eax, 4
je 0x420cea
mov ebx, 0x8007139f
push ebx
push 0x21d
push str.cabextract.cpp
mov esi, ebx
call fcn.00403858
push str.Invalid_operation_for_this_state.
push ebx
jmp 0x420fa0
mov esi, 0x80004004
jmp 0x420faa
mov ebx, dword [ebp + 0xc]
push 0xfde9
push 0
push dword [ebx + 4]
push dword [edi + 0x34]
call fcn.00402236
mov esi, eax
test esi, esi
jns 0x420d25
push dword [ebx + 4]
push str.Failed_to_copy_stream_name:__ls
push esi
call fcn.0044041e
add esp, 0xc
jmp 0x420fa7
push dword [edi + 0x28]
call dword [sym.imp.KERNEL32.dll_SetEvent]
test eax, eax
jne 0x420d6a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x420d49
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x420d50
mov esi, 0x80004005
push esi
push 0x227
push str.cabextract.cpp
call fcn.00403858
push str.Failed_to_set_operation_complete_event.
jmp 0x420f9f
push 0xffffffffffffffff
push dword [edi + 0x24]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0xffffffff
jne 0x420db2
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x420d91
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x420d98
mov esi, 0x80004005
push esi
push 0x22d
push str.cabextract.cpp
call fcn.00403858
push str.Failed_to_wait_for_begin_operation_event.
jmp 0x420f9f
push dword [edi + 0x24]
call dword [sym.imp.KERNEL32.dll_ResetEvent]
test eax, eax
jne 0x420df7
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x420dd6
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x420ddd
mov esi, 0x80004005
push esi
push 0x232
push str.cabextract.cpp
call fcn.00403858
push str.Failed_to_reset_begin_operation_event.
jmp 0x420f9f
mov eax, dword [edi + 0x2c]
dec eax
sub eax, 1
je 0x420e6d
sub eax, 1
je 0x420e30
sub eax, 1
je 0x420e29
sub eax, 1
je 0x420e1f
mov ebx, 0x8007139f
push ebx
push 0x268
jmp 0x420cd3
mov esi, 0x80004004
jmp 0x420fa7
xor ebx, ebx
jmp 0x420faa
push 1
push dword [ebx]
call fcn.0040395a
mov dword [edi + 0x40], eax
test eax, eax
jne 0x420e5f
mov esi, 0x8007000e
push esi
push 0x257
push str.cabextract.cpp
call fcn.00403858
push str.Failed_to_allocate_buffer_for_stream.
jmp 0x420f9f
mov eax, dword [ebx]
and dword [edi + 0x48], 0
mov dword [edi + 0x44], eax
jmp 0x420fa7
push 0
push 0x80
push 2
push 0
push 1
push 0x40000000
push dword [edi + 0x38]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ecx, eax
mov dword [edi + 0x3c], ecx
cmp ecx, 0xffffffff
jne 0x420ecd
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x420ea9
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x420eb0
mov esi, 0x80004005
push esi
push 0x23d
push str.cabextract.cpp
call fcn.00403858
push dword [edi + 0x38]
push str.Failed_to_create_file:__ls
jmp 0x420d17
mov eax, dword [ebx]
mov ebx, dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
push 0
push 0
cdq
push edx
push eax
push ecx
call ebx
test eax, eax
jne 0x420f1b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x420efa
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x420f01
mov esi, 0x80004005
push esi
push 0x244
push str.cabextract.cpp
call fcn.00403858
push str.Failed_to_set_file_pointer_to_end_of_file.
jmp 0x420f9f
push dword [edi + 0x3c]
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x420f5d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x420f3f
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x420f46
mov esi, 0x80004005
push esi
push 0x249
push str.cabextract.cpp
call fcn.00403858
push str.Failed_to_set_end_of_file.
jmp 0x420f9f
xor eax, eax
push eax
push eax
push eax
push eax
push dword [edi + 0x3c]
call ebx
test eax, eax
jne 0x420fa7
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x420f83
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x420f8a
mov esi, 0x80004005
push esi
push 0x24f
push str.cabextract.cpp
call fcn.00403858
push str.Failed_to_set_file_pointer_to_beginning_of_file.
push esi
call fcn.0044041e
pop ecx
pop ecx
xor ebx, ebx
inc ebx
mov dword [edi + 0x30], esi
test esi, esi
jns 0x420fb4
or ebx, 0xffffffff
pop edi
pop esi
mov eax, ebx
pop ebx
pop ebp
ret 8