Function at 0x10056ad5
Capabilities:
Clear file content

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x50
mov dword [ebp - 4], edi
mov dword [ebp - 8], esi
mov dword [ebp - 0xc], ebx
mov esi, eax
mov edx, dword [esi + 0x40]
mov ebx, dword [esi + 0x3c]
mov dword [ebp - 0x10], 0
test edx, edx
je 0x1005675a
sub ebx, edx
jmp 0x1005675f
mov eax, dword [esi + 0x38]
sub ebx, eax
movsx ecx, byte [esi + 0x11c]
mov edi, ebx
add edi, dword [esi + 0xe0]
cmp ecx, 1
je 0x100567c3
cmp ecx, 3
je 0x100567c3
test ebx, ebx
je 0x100567bc
test edx, edx
jne 0x10056783
mov edx, dword [esi + 0x38]
mov eax, dword [esi + 0x100]
cmp eax, 0xb
jne 0x10056797
cmp ecx, 4
je 0x10056b9b
push ebx
push edx
push esi
call fcn.1002ccf0
add esp, 0xc
cmp eax, 0xffffffff
je 0x10056bbd
xor eax, eax
test eax, eax
jne 0x10056b21
movsx ecx, byte [esi + 0x11c]
and byte [esi + 0x12c], 0xef
add ecx, 0xffffffff
cmp ecx, 6
ja case.default.0x100567d6
mov eax, dword [ecx*4 + 0x100c0210]
jmp eax
mov byte [ebp - 0x24], 0xd
lea eax, [ebp - 0x24]
push 1
push eax
push esi
call fcn.1002ccf0
add esp, 0xc
cmp eax, 0xffffffff
je 0x10056bd3
jmp case.0x100567d6.4
mov byte [ebp - 0x24], 0xd
lea eax, [ebp - 0x24]
push 2
mov byte [ebp - 0x23], 0xa
push eax
push esi
call fcn.1002ccf0
add esp, 0xc
cmp eax, 0xffffffff
je 0x10056bf1
jmp case.0x100567d6.4
mov ecx, dword [esi + 0x40]
mov eax, ebx
shl eax, 0x10
add eax, 0xfffe0000
shr eax, 0x10
mov edx, eax
mov word [ebp - 0x40], ax
test ecx, ecx
je 0x10056c6f
mov byte [ecx], dl
mov edx, dword [esi + 0x40]
shr eax, 8
mov byte [edx + 1], al
mov eax, dword [esi + 0x40]
test eax, eax
je 0x10056c43
push ebx
push eax
push esi
call fcn.1002ccf0
add esp, 0xc
cmp eax, 0xffffffff
je 0x10056c2d
xor eax, eax
and byte [esi + 0x12c], 0xef
test eax, eax
jne 0x10056b21
and ebx, 1
je case.0x100567d6.4
mov byte [ebp - 0x28], 0
lea eax, [ebp - 0x28]
push 1
push eax
push esi
call fcn.1002ccf0
add esp, 0xc
cmp eax, 0xffffffff
je 0x10056c0f
jmp case.0x100567d6.4
mov eax, dword [esi + 0x114]
add edi, 0xfffffffc
test eax, eax
je 0x100568b7
mov eax, edi
neg eax
mov dword [ebp - 0x40], eax
jmp 0x100568ba
mov dword [ebp - 0x40], edi
movzx eax, byte [esi + 0x12d]
test al, 8
je 0x100568fe
lea ebx, [ebp - 0x3d]
movzx eax, byte [ebx]
mov dword [ebp - 0x18], ebx
mov byte [ebp - 0x10], al
lea eax, [ebp - 0xf]
mov dword [ebp - 0x3c], eax
lea edx, [ebp - 0x3e]
movzx ecx, byte [edx]
mov dword [ebp - 0x1c], edx
lea edx, [ebp - 0xe]
mov byte [eax], cl
lea eax, [ebp - 0x3f]
mov dword [ebp - 0x14], eax
movzx eax, byte [eax]
mov dword [ebp - 0x20], edx
lea ebx, [ebp - 0xd]
mov byte [edx], al
movzx eax, byte [ebp - 0x40]
mov byte [ebx], al
jmp 0x10056935
movzx ebx, byte [ebp - 0x40]
mov byte [ebp - 0x10], bl
lea ecx, [ebp - 0xf]
mov dword [ebp - 0x3c], ecx
lea eax, [ebp - 0x3f]
movzx edx, byte [eax]
mov dword [ebp - 0x14], eax
mov byte [ecx], dl
lea edx, [ebp - 0xe]
mov dword [ebp - 0x20], edx
lea eax, [ebp - 0x3e]
mov dword [ebp - 0x1c], eax
lea ebx, [ebp - 0xd]
movzx eax, byte [eax]
mov byte [edx], al
lea eax, [ebp - 0x3d]
mov dword [ebp - 0x18], eax
movzx eax, byte [eax]
mov byte [ebx], al
lea eax, [ebp - 0x10]
push 4
push eax
push esi
call fcn.1002ccf0
add esp, 0xc
cmp eax, 0xffffffff
je 0x10056cdd
movzx eax, byte [esi + 0x12e]
test al, 0x40
jne case.0x100567d6.4
lea edx, [ebp - 0x34]
push 1
push edx
xor eax, eax
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], eax
push 0
push dword [esi + 0xb4]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [ebp - 0x38], eax
cmp eax, 0xffffffff
jne 0x10056995
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x10056995
mov eax, 0xffffffff
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x38]
mov edx, dword [ebp - 0x34]
mov ecx, dword [esi + 0xdc]
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x28], edx
mov edx, dword [esi + 0xd8]
mov dword [ebp - 0x30], edx
mov dword [ebp - 0x2c], ecx
lea eax, [ebp - 0x2c]
push 0
push eax
push edx
push dword [esi + 0xb4]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [ebp - 0x30], eax
cmp eax, 0xffffffff
jne 0x100569e3
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x100569e3
mov eax, 0xffffffff
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], eax
mov edx, dword [ebp - 0x30]
mov eax, dword [ebp - 0x2c]
add edx, 1
add eax, 1
or edx, eax
je 0x10056cbf
movzx eax, byte [esi + 0x132]
test al, 8
je 0x10056a12
and eax, 0xfffffff7
mov byte [esi + 0x132], al
neg edi
mov dword [ebp - 0x40], edi
jmp 0x10056a15
mov dword [ebp - 0x40], edi
movzx eax, byte [esi + 0x12d]
test al, 8
je 0x10056a47
mov edi, dword [ebp - 0x18]
mov edx, dword [ebp - 0x1c]
movzx eax, byte [edi]
movzx ecx, byte [edx]
mov edx, dword [ebp - 0x20]
mov byte [ebp - 0x10], al
mov eax, dword [ebp - 0x3c]
mov byte [eax], cl
mov eax, dword [ebp - 0x14]
movzx eax, byte [eax]
mov byte [edx], al
movzx eax, byte [ebp - 0x40]
mov byte [ebx], al
jmp 0x10056a6c
movzx eax, byte [ebp - 0x40]
mov edi, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x3c]
movzx edx, byte [edi]
mov byte [ebp - 0x10], al
mov eax, dword [ebp - 0x1c]
movzx eax, byte [eax]
mov byte [ecx], dl
mov edx, dword [ebp - 0x20]
mov byte [edx], al
mov eax, dword [ebp - 0x18]
movzx eax, byte [eax]
mov byte [ebx], al
lea eax, [ebp - 0x10]
push 4
push eax
push esi
call fcn.1002ccf0
add esp, 0xc
cmp eax, 0xffffffff
je 0x10056ca1
mov ecx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x40], ecx
mov dword [ebp - 0x3c], eax
lea edx, [ebp - 0x3c]
push 0
push edx
push ecx
push dword [esi + 0xb4]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [ebp - 0x40], eax
cmp eax, 0xffffffff
jne 0x10056ac0
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x10056ac0
mov eax, 0xffffffff
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x3c], eax
mov edx, dword [ebp - 0x40]
mov eax, dword [ebp - 0x3c]
add edx, 1
add eax, 1
or edx, eax
jne case.0x100567d6.4
jmp 0x10056c83
mov eax, dword [esi + 0xc0]
cmp ebx, eax
jae 0x10056af5
sub eax, ebx
push eax
push 0
push dword [esi + 0x3c]
call fcn.1007f474
add esp, 0xc
mov ebx, dword [esi + 0xc0]
mov eax, dword [esi + 0x40]
test eax, eax
je 0x10056d11
push ebx
push eax
push esi
call fcn.1002ccf0
add esp, 0xc
cmp eax, 0xffffffff
je 0x10056cfb
xor eax, eax
and byte [esi + 0x12c], 0xef
test eax, eax
je case.0x100567d6.4
mov ebx, dword [ebp - 0xc]
mov esi, dword [ebp - 8]
mov edi, dword [ebp - 4]
mov esp, ebp
pop ebp
ret
push 0xf8c
push str.for_wseq.c
push 2
push 8
call fcn.100149ac
add esp, 0x10
movzx eax, byte [esi + 0x12d]
test al, 2
je 0x10056b8c
push dword [esi + 0xb4]
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
je 0x10056b63
xor eax, eax
jmp 0x10056b74
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0xb8], eax
mov eax, 0x26
and byte [esi + 0x12d], 0xfd
test eax, eax
je 0x10056b8c
mov ebx, dword [ebp - 0xc]
mov esi, dword [ebp - 8]
mov edi, dword [ebp - 4]
mov esp, ebp
pop ebp
ret
mov ebx, dword [ebp - 0xc]
mov esi, dword [ebp - 8]
mov edi, dword [ebp - 4]
xor eax, eax
mov esp, ebp
pop ebp
ret
mov edi, dword [esi + 0x38]
mov dword [esp + 0xc], 1
mov dword [esi + 0x3c], edi
mov eax, esi
mov ecx, ebx
call fcn.10055fc0
mov edi, dword [esi + 0xe0]
jmp 0x100567ad
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0xb8], eax
mov eax, 0x26
jmp 0x100567ad
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, dword [ebp - 0xc]
mov edi, dword [ebp - 4]
mov dword [esi + 0xb8], eax
mov esi, dword [ebp - 8]
mov eax, 0x26
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, dword [ebp - 0xc]
mov edi, dword [ebp - 4]
mov dword [esi + 0xb8], eax
mov esi, dword [ebp - 8]
mov eax, 0x26
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, dword [ebp - 0xc]
mov edi, dword [ebp - 4]
mov dword [esi + 0xb8], eax
mov esi, dword [ebp - 8]
mov eax, 0x26
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0xb8], eax
mov eax, 0x26
jmp 0x10056868
push ebx
push dword [esi + 0x38]
push esi
call fcn.1002ccf0
add esp, 0xc
cmp eax, 0xffffffff
jne 0x10056866
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0xb8], eax
mov eax, 0x26
jmp 0x10056868
movzx eax, byte [ebp - 0x3f]
mov edi, dword [esi + 0x38]
mov byte [edi], dl
mov edx, dword [esi + 0x38]
mov byte [edx + 1], al
jmp 0x10056847
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, dword [ebp - 0xc]
mov edi, dword [ebp - 4]
mov dword [esi + 0xb8], eax
mov esi, dword [ebp - 8]
mov eax, 0x26
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, dword [ebp - 0xc]
mov edi, dword [ebp - 4]
mov dword [esi + 0xb8], eax
mov esi, dword [ebp - 8]
mov eax, 0x26
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, dword [ebp - 0xc]
mov edi, dword [ebp - 4]
mov dword [esi + 0xb8], eax
mov esi, dword [ebp - 8]
mov eax, 0x26
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, dword [ebp - 0xc]
mov edi, dword [ebp - 4]
mov dword [esi + 0xb8], eax
mov esi, dword [ebp - 8]
mov eax, 0x26
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0xb8], eax
mov eax, 0x26
jmp 0x10056b16
push ebx
push dword [esi + 0x38]
push esi
call fcn.1002ccf0
add esp, 0xc
cmp eax, 0xffffffff
jne 0x10056b14
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0xb8], eax
mov eax, 0x26
jmp 0x10056b16