Function at 0x53e540
Capabilities:
Clear file content

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov dword [ebp - 4], 0
mov ecx, dword [esi + 0x30]
mov edi, dword [esi + 0x2c]
test ecx, ecx
je 0x53e561
sub edi, ecx
jmp 0x53e564
sub edi, dword [esi + 0x28]
mov eax, dword [esi + 0xe0]
mov ebx, edi
add ebx, eax
mov al, byte [esi + 0x11c]
cmp al, 1
je 0x53e5cc
cmp al, 3
je 0x53e5cc
test edi, edi
je 0x53e5c2
test ecx, ecx
jne 0x53e587
mov ecx, dword [esi + 0x28]
cmp dword [esi + 0x100], 0xb
jne 0x53e5af
cmp al, 4
jne 0x53e5af
mov eax, dword [esi + 0x28]
push 1
push edi
push ecx
push esi
mov dword [esi + 0x2c], eax
call fcn.0053e3a0
mov ebx, dword [esi + 0xe0]
add esp, 0x10
jmp 0x53e5ba
push edi
push ecx
push esi
call fcn.0053e330
add esp, 0xc
test eax, eax
jne 0x53e87c
and dword [esi + 0x128], 0xfbffffff
movsx eax, byte [esi + 0x11c]
dec eax
cmp eax, 6
ja case.default.0x53e5dd
jmp dword [eax*4 + 0x53e884]
mov ecx, dword [esi + 0xb4]
cmp edi, ecx
jae 0x53e609
sub ecx, edi
mov edi, dword [esi + 0x2c]
mov edx, ecx
xor eax, eax
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov edi, dword [esi + 0xb4]
mov eax, dword [esi + 0x30]
push edi
test eax, eax
jne 0x53e614
mov eax, dword [esi + 0x28]
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 case.0x53e5dd.5
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 0x114]
lea edi, [ebx - 4]
test eax, eax
mov eax, edi
je 0x53e650
neg eax
mov cl, byte [esi + 0x12c]
mov dword [ebp + 8], eax
test cl, 2
je 0x53e672
mov cl, byte [ebp + 0xb]
mov dl, byte [ebp + 0xa]
mov byte [ebp - 4], cl
mov byte [ebp - 3], dl
mov byte [ebp - 2], ah
mov byte [ebp - 1], al
jmp 0x53e684
mov cl, byte [ebp + 0xb]
mov byte [ebp - 4], al
mov al, byte [ebp + 0xa]
mov byte [ebp - 3], ah
mov byte [ebp - 2], al
mov byte [ebp - 1], cl
lea edx, [ebp - 4]
push 4
push edx
push esi
call fcn.0054c790
add esp, 0xc
cmp eax, 0xffffffff
je 0x53e7fa
test dword [esi + 0x12c], 0x40000
jne case.0x53e5dd.5
mov eax, dword [esi + 0xa8]
push eax
call fcn.005492d0
mov ecx, dword [esi + 0xdc]
mov dword [ebp - 0xc], edx
mov edx, dword [esi + 0xd8]
mov ebx, eax
mov eax, dword [esi + 0xa8]
push 0
push ecx
push edx
push eax
call fcn.00551df0
and eax, edx
add esp, 0x14
cmp eax, 0xffffffff
je 0x53e7fa
mov eax, dword [esi + 0x134]
test eax, 0x1000000
je 0x53e701
and eax, 0xfeffffff
mov dword [esi + 0x134], eax
neg edi
mov cl, byte [esi + 0x12c]
mov eax, edi
test cl, 2
mov dword [ebp + 8], eax
je 0x53e725
mov cl, byte [ebp + 0xb]
mov dl, byte [ebp + 0xa]
mov byte [ebp - 4], cl
mov byte [ebp - 3], dl
mov byte [ebp - 2], ah
mov byte [ebp - 1], al
jmp 0x53e737
mov cl, byte [ebp + 0xb]
mov byte [ebp - 4], al
mov al, byte [ebp + 0xa]
mov byte [ebp - 3], ah
mov byte [ebp - 2], al
mov byte [ebp - 1], cl
lea edx, [ebp - 4]
push 4
push edx
push esi
call fcn.0054c790
add esp, 0xc
cmp eax, 0xffffffff
je 0x53e7fa
mov eax, dword [ebp - 0xc]
mov ecx, dword [esi + 0xa8]
push 0
push eax
push ebx
push ecx
call fcn.00551df0
add esp, 0x10
and eax, edx
jmp 0x53e7f5
mov ecx, dword [esi + 0x30]
lea eax, [edi - 2]
test ecx, ecx
je 0x53e77d
mov byte [ecx], al
mov edx, dword [esi + 0x30]
jmp 0x53e785
mov ecx, dword [esi + 0x28]
mov byte [ecx], al
mov edx, dword [esi + 0x28]
mov byte [edx + 1], ah
mov eax, dword [esi + 0x30]
test eax, eax
push edi
jne 0x53e793
mov eax, dword [esi + 0x28]
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 0x53e87c
and edi, 0x80000001
jns 0x53e7c4
dec edi
or edi, 0xfffffffe
inc edi
je case.0x53e5dd.5
lea ecx, [ebp + 0xb]
push 1
mov byte [ebp + 0xb], 0
push ecx
jmp 0x53e7ec
lea edx, [ebp - 8]
push 2
mov byte [ebp - 8], 0xd
mov byte [ebp - 7], 0xa
push edx
jmp 0x53e7ec
lea eax, [ebp - 8]
push 1
mov byte [ebp - 8], 0xd
push eax
push esi
call fcn.0054c790
add esp, 0xc
cmp eax, 0xffffffff
jne case.0x53e5dd.5
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 0xf5c
push 0x57f7a0
push 2
push 0xc0000008
call fcn.005430d0
add esp, 0x10
test dword [esi + 0x128], 0x80000000
je 0x53e87a
mov ecx, dword [esi + 0xa8]
xor edi, edi
push ecx
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x53e85b
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 0x53e87a
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