Function at 0x53e920
Capabilities:
Clear file content

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
movsx eax, byte [esi + 0x11c]
mov edi, dword [esi + 0xfc]
mov ebx, dword [esi + 0xb4]
dec eax
cmp eax, 6
ja case.default.0x53e949
jmp dword [eax*4 + 0x53ebe8]
mov edx, dword [esi + 0x128]
and edx, 0xfbffffff
mov eax, edx
mov dword [esi + 0x128], edx
test ah, 0x10
je 0x53e995
test eax, 0x400000
je 0x53e995
cmp byte [esi + 0x11d], 2
jne 0x53e995
lea eax, [ebp - 4]
push 1
push eax
push esi
mov byte [ebp - 4], 0x20
dec ebx
call fcn.0053e330
add esp, 0xc
test eax, eax
jne 0x53ebde
mov ecx, dword [esi + 0x80]
push edi
push ecx
push esi
call fcn.0053e330
add esp, 0xc
test eax, eax
jne 0x53ebde
cmp edi, ebx
jge 0x53eb8d
sub ebx, edi
mov edi, dword [esi + 0x28]
mov ecx, ebx
push ebx
mov edx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [esi + 0x28]
push eax
push esi
call fcn.0053e330
add esp, 0xc
test eax, eax
je 0x53eb8d
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [esi + 0x128]
lea ecx, [ebp - 8]
push 4
and edx, 0xfbffffff
push ecx
push esi
mov dword [ebp - 8], edi
mov dword [esi + 0x128], edx
call fcn.0054c790
add esp, 0xc
cmp eax, 0xffffffff
je 0x53eb5c
mov edx, dword [esi + 0x80]
push edi
push edx
push esi
call fcn.0053e330
add esp, 0xc
test eax, eax
jne 0x53ebde
lea eax, [ebp - 8]
push 4
push eax
jmp 0x53eb4e
mov ecx, dword [esi + 0x28]
lea eax, [edi + 2]
push 4
mov byte [ecx], al
mov edx, dword [esi + 0x28]
mov byte [edx + 1], ah
mov ebx, dword [esi + 0x128]
mov eax, dword [esi + 0x28]
and ebx, 0xfbffffff
push eax
push esi
mov dword [esi + 0x128], ebx
call fcn.0054c790
add esp, 0xc
cmp eax, 0xffffffff
je 0x53eb5c
mov ecx, dword [esi + 0x80]
push edi
push ecx
push esi
call fcn.0053e330
add esp, 0xc
test eax, eax
jne 0x53ebde
and edi, 0x80000001
jns 0x53ea97
dec edi
or edi, 0xfffffffe
inc edi
je 0x53eb8d
lea edx, [ebp + 0xb]
push 1
mov byte [ebp + 0xb], 0
push edx
jmp 0x53eb4e
mov eax, dword [esi + 0x80]
push edi
push eax
push esi
call fcn.0053e330
mov edx, dword [esi + 0x128]
add esp, 0xc
and edx, 0xfbffffff
test eax, eax
mov dword [esi + 0x128], edx
je 0x53eb8d
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [esi + 0x80]
push edi
push ecx
push esi
call fcn.0053e330
mov edx, dword [esi + 0x128]
add esp, 0xc
and edx, 0xfbffffff
test eax, eax
mov dword [esi + 0x128], edx
jne 0x53ebde
lea edx, [ebp - 4]
push 2
mov byte [ebp - 4], 0xd
mov byte [ebp - 3], 0xa
push edx
jmp 0x53eb4e
mov eax, dword [esi + 0x80]
push edi
push eax
push esi
call fcn.0053e330
mov edx, dword [esi + 0x128]
add esp, 0xc
and edx, 0xfbffffff
test eax, eax
mov dword [esi + 0x128], edx
jne 0x53ebde
lea ecx, [ebp - 4]
push 1
mov byte [ebp - 4], 0xd
push ecx
push esi
call fcn.0054c790
add esp, 0xc
cmp eax, 0xffffffff
jne 0x53eb8d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0xac], eax
pop edi
pop esi
mov eax, 0xc0000026
pop ebx
mov esp, ebp
pop ebp
ret
push 0x122a
push 0x57f7bc
push 2
push 0xc0000008
call fcn.005430d0
add esp, 0x10
test dword [esi + 0x128], 0x80000000
je 0x53ebdc
mov edx, dword [esi + 0xa8]
xor edi, edi
push edx
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x53ebbd
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0xac], eax
mov edi, 0xc0000026
mov ecx, dword [esi + 0x128]
and ecx, 0x7fffffff
test edi, edi
mov dword [esi + 0x128], ecx
je 0x53ebdc
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret