Function at 0x4ade50
Capabilities:
Clear file content

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x50
mov dword [ebp - 8], edi
mov dword [ebp - 4], esi
mov dword [ebp - 0xc], ebx
mov ebx, eax
mov edx, dword [ebx + 0x40]
mov edi, dword [ebx + 0x3c]
mov dword [ebp - 0x10], 0
test edx, edx
je 0x4ade76
sub edi, edx
jmp 0x4ade7b
mov eax, dword [ebx + 0x38]
sub edi, eax
movsx eax, byte [ebx + 0x144]
mov esi, edi
add esi, dword [ebx + 0x108]
cmp eax, 1
je 0x4adf08
cmp eax, 3
je 0x4adf08
test edi, edi
je 0x4adf01
test edx, edx
jne 0x4ade9f
mov edx, dword [ebx + 0x38]
mov ecx, dword [ebx + 0x128]
cmp ecx, 0xb
jne 0x4adedc
cmp eax, 5
je 0x4adeb4
cmp eax, 4
jne 0x4adedc
mov ecx, dword [ebx + 0x38]
mov dword [ebx + 0x3c], ecx
cmp eax, 5
je 0x4ae321
mov dword [esp + 0xc], 1
mov eax, ebx
mov ecx, edi
call fcn.004ada50
mov esi, dword [ebx + 0x108]
jmp 0x4adef2
push edi
push edx
push ebx
call fcn.004a21f0
add esp, 0xc
cmp eax, 0xffffffff
je 0x4ae34e
xor eax, eax
test eax, eax
jne 0x4ae2a6
movsx eax, byte [ebx + 0x144]
and byte [ebx + 0x15c], 0xbf
lea edx, [eax - 1]
cmp edx, 7
ja case.default.0x4adf1b
mov edx, dword [edx*4 + 0x4fd744]
jmp edx
mov byte [ebp - 0x24], 0xd
lea eax, [ebp - 0x24]
push 1
push eax
push ebx
call fcn.004a21f0
add esp, 0xc
cmp eax, 0xffffffff
je 0x4ae364
jmp case.0x4adf1b.5
cmp eax, 8
je 0x4ae3a0
xor edx, edx
mov byte [ebp + edx - 0x24], 0xa
lea eax, [ebp - 0x24]
inc edx
push edx
push eax
push ebx
call fcn.004a21f0
add esp, 0xc
cmp eax, 0xffffffff
je 0x4ae382
jmp case.0x4adf1b.5
mov edx, dword [ebx + 0x40]
lea eax, [edi - 2]
mov word [ebp - 0x40], ax
test edx, edx
je 0x4ae3f1
mov byte [edx], al
mov edx, dword [ebx + 0x40]
shr eax, 8
mov byte [edx + 1], al
mov eax, dword [ebx + 0x40]
test eax, eax
jne 0x4adf92
mov eax, dword [ebx + 0x38]
push edi
push eax
push ebx
call fcn.004a21f0
add esp, 0xc
cmp eax, 0xffffffff
je 0x4ae3cc
and byte [ebx + 0x15c], 0xbf
test edi, 1
je case.0x4adf1b.5
mov byte [ebp - 0x28], 0
lea eax, [ebp - 0x28]
push 1
push eax
push ebx
call fcn.004a21f0
add esp, 0xc
cmp eax, 0xffffffff
je 0x4ae3ae
jmp case.0x4adf1b.5
mov eax, dword [ebx + 0x13c]
add esi, 0xfffffffc
test eax, eax
je 0x4adff0
mov eax, esi
neg eax
mov dword [ebp - 0x40], eax
jmp 0x4adff3
mov dword [ebp - 0x40], esi
movzx eax, byte [ebx + 0x15d]
test al, 0x20
je 0x4ae037
lea edi, [ebp - 0x3d]
movzx eax, byte [edi]
mov dword [ebp - 0x14], edi
mov byte [ebp - 0x10], al
lea edi, [ebp - 0xf]
mov dword [ebp - 0x3c], edi
lea edx, [ebp - 0x3e]
movzx ecx, byte [edx]
mov dword [ebp - 0x1c], edx
lea eax, [ebp - 0x3f]
movzx edx, byte [eax]
mov byte [edi], cl
mov dword [ebp - 0x18], eax
movzx eax, byte [ebp - 0x40]
lea ecx, [ebp - 0xe]
mov dword [ebp - 0x20], ecx
mov byte [ecx], dl
lea edi, [ebp - 0xd]
mov byte [edi], al
jmp 0x4ae06e
movzx eax, byte [ebp - 0x40]
mov byte [ebp - 0x10], al
lea ecx, [ebp - 0xf]
mov dword [ebp - 0x3c], ecx
lea edi, [ebp - 0x3f]
movzx edx, byte [edi]
mov dword [ebp - 0x18], edi
mov byte [ecx], dl
lea edx, [ebp - 0xe]
mov dword [ebp - 0x20], edx
lea edi, [ebp - 0x3e]
movzx eax, byte [edi]
mov byte [edx], al
mov dword [ebp - 0x1c], edi
lea edi, [ebp - 0xd]
lea ecx, [ebp - 0x3d]
movzx eax, byte [ecx]
mov dword [ebp - 0x14], ecx
mov byte [edi], al
lea eax, [ebp - 0x10]
push 4
push eax
push ebx
call fcn.004a21f0
add esp, 0xc
cmp eax, 0xffffffff
je 0x4ae423
movzx eax, byte [ebx + 0x15f]
test al, 2
jne case.0x4adf1b.5
lea eax, [ebp - 0x34]
push 1
push eax
mov ecx, dword [ebx + 0xd4]
xor edx, edx
mov dword [ebp - 0x38], edx
push edx
mov dword [ebp - 0x34], edx
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x38], eax
cmp eax, 0xffffffff
je 0x4ae0c4
mov eax, dword [ebp - 0x34]
mov dword [ebp - 0x28], eax
jmp 0x4ae0ed
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x4ae0e1
mov eax, 0xffffffff
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], eax
jmp 0x4ae0ed
mov eax, dword [ebp - 0x38]
mov edx, dword [ebp - 0x34]
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x28], edx
push 0
mov edx, dword [ebx + 0xd4]
mov eax, dword [ebx + 0x100]
mov ecx, dword [ebx + 0x104]
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], ecx
lea ecx, [ebp - 0x2c]
push ecx
push eax
push edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [ebp - 0x30], eax
cmp eax, 0xffffffff
je 0x4ae120
mov edx, dword [ebp - 0x2c]
jmp 0x4ae159
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x4ae153
mov eax, 0xffffffff
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, dword [ebp - 4]
mov edi, dword [ebp - 8]
mov dword [ebx + 0xd8], eax
mov ebx, dword [ebp - 0xc]
mov eax, 0x26
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x30]
mov edx, dword [ebp - 0x2c]
inc eax
inc edx
or eax, edx
je 0x4ae135
movzx eax, byte [ebx + 0x162]
test al, 0x20
je 0x4ae17a
and eax, 0xffffffdf
mov byte [ebx + 0x162], al
neg esi
mov dword [ebp - 0x40], esi
jmp 0x4ae17d
mov dword [ebp - 0x40], esi
movzx eax, byte [ebx + 0x15d]
test al, 0x20
je 0x4ae1af
mov esi, dword [ebp - 0x14]
mov edx, dword [ebp - 0x1c]
movzx eax, byte [esi]
mov esi, dword [ebp - 0x3c]
movzx ecx, byte [edx]
mov byte [esi], cl
mov ecx, dword [ebp - 0x20]
mov byte [ebp - 0x10], al
mov eax, dword [ebp - 0x18]
movzx edx, byte [eax]
movzx eax, byte [ebp - 0x40]
mov byte [ecx], dl
mov byte [edi], al
jmp 0x4ae1d4
movzx eax, byte [ebp - 0x40]
mov esi, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x3c]
movzx edx, byte [esi]
mov esi, dword [ebp - 0x1c]
mov byte [ebp - 0x10], al
movzx eax, byte [esi]
mov byte [ecx], dl
mov edx, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x14]
mov byte [edx], al
movzx eax, byte [ecx]
mov byte [edi], al
lea eax, [ebp - 0x10]
push 4
push eax
push ebx
call fcn.004a21f0
add esp, 0xc
cmp eax, 0xffffffff
je 0x4ae405
mov ecx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x28]
lea edx, [ebp - 0x3c]
push 0
mov esi, dword [ebx + 0xd4]
mov dword [ebp - 0x40], ecx
push edx
mov dword [ebp - 0x3c], eax
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [ebp - 0x40], eax
cmp eax, 0xffffffff
je 0x4ae219
mov edx, dword [ebp - 0x3c]
jmp 0x4ae252
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x4ae24c
mov eax, 0xffffffff
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x3c], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, dword [ebp - 4]
mov edi, dword [ebp - 8]
mov dword [ebx + 0xd8], eax
mov ebx, dword [ebp - 0xc]
mov eax, 0x26
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x40]
mov edx, dword [ebp - 0x3c]
inc eax
inc edx
or eax, edx
jne case.0x4adf1b.5
jmp 0x4ae22e
mov eax, dword [ebx + 0xe8]
cmp edi, eax
jae 0x4ae27a
sub eax, edi
push eax
push 0
push dword [ebx + 0x3c]
call fcn.004e2770
add esp, 0xc
mov edi, dword [ebx + 0xe8]
mov eax, dword [ebx + 0x40]
test eax, eax
je 0x4ae457
push edi
push eax
push ebx
call fcn.004a21f0
add esp, 0xc
cmp eax, 0xffffffff
je 0x4ae441
xor eax, eax
and byte [ebx + 0x15c], 0xbf
test eax, eax
je case.0x4adf1b.5
mov ebx, dword [ebp - 0xc]
mov esi, dword [ebp - 4]
mov edi, dword [ebp - 8]
mov esp, ebp
pop ebp
ret
push 0xf6c
push str.for_wseq.c
push 2
push 8
call fcn.00492dd0
add esp, 0x10
movzx eax, byte [ebx + 0x15d]
test al, 8
je 0x4ae312
push dword [ebx + 0xd4]
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
je 0x4ae2ed
and byte [ebx + 0x15d], 0xf7
jmp 0x4ae312
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, dword [ebp - 4]
mov edi, dword [ebp - 8]
and byte [ebx + 0x15d], 0xf7
mov dword [ebx + 0xd8], eax
mov ebx, dword [ebp - 0xc]
mov eax, 0x26
mov esp, ebp
pop ebp
ret
mov ebx, dword [ebp - 0xc]
mov esi, dword [ebp - 4]
mov edi, dword [ebp - 8]
xor eax, eax
mov esp, ebp
pop ebp
ret
push edi
push edx
push ebx
call fcn.004a21f0
add esp, 0xc
cmp eax, 0xffffffff
je 0x4ae338
xor eax, eax
jmp 0x4aded4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebx + 0xd8], eax
mov eax, 0x26
jmp 0x4aded4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebx + 0xd8], eax
mov eax, 0x26
jmp 0x4adef2
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, dword [ebp - 4]
mov edi, dword [ebp - 8]
mov dword [ebx + 0xd8], eax
mov ebx, dword [ebp - 0xc]
mov eax, 0x26
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, dword [ebp - 4]
mov edi, dword [ebp - 8]
mov dword [ebx + 0xd8], eax
mov ebx, dword [ebp - 0xc]
mov eax, 0x26
mov esp, ebp
pop ebp
ret
mov byte [ebp - 0x24], 0xd
mov edx, 1
jmp 0x4adf49
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, dword [ebp - 4]
mov edi, dword [ebp - 8]
mov dword [ebx + 0xd8], eax
mov ebx, dword [ebp - 0xc]
mov eax, 0x26
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, dword [ebp - 4]
mov edi, dword [ebp - 8]
and byte [ebx + 0x15c], 0xbf
mov dword [ebx + 0xd8], eax
mov ebx, dword [ebp - 0xc]
mov eax, 0x26
mov esp, ebp
pop ebp
ret
mov esi, dword [ebx + 0x38]
mov byte [esi], al
movzx eax, byte [ebp - 0x3f]
mov edx, dword [ebx + 0x38]
mov byte [edx + 1], al
jmp 0x4adf88
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, dword [ebp - 4]
mov edi, dword [ebp - 8]
mov dword [ebx + 0xd8], eax
mov ebx, dword [ebp - 0xc]
mov eax, 0x26
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, dword [ebp - 4]
mov edi, dword [ebp - 8]
mov dword [ebx + 0xd8], eax
mov ebx, dword [ebp - 0xc]
mov eax, 0x26
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebx + 0xd8], eax
mov eax, 0x26
jmp 0x4ae29b
push edi
push dword [ebx + 0x38]
push ebx
call fcn.004a21f0
add esp, 0xc
cmp eax, 0xffffffff
jne 0x4ae299
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebx + 0xd8], eax
mov eax, 0x26
jmp 0x4ae29b