Function at 0x498c00
Capabilities:
Clear file content

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, dword [ebp + 0x1c]
sub esp, 0x1c
push ebx
push esi
push edi
test eax, eax
je 0x49979a
dec eax
mov dword [ebp + 0x1c], eax
mov eax, dword [ebp + 0x18]
mov edi, dword [eax]
mov eax, dword [edi + 8]
cmp eax, 5
ja case.0x498c28.1
jmp dword [eax*4 + 0x4997a8]
mov ecx, dword [edi]
push 0
push 1
call fcn.00401680
mov edi, eax
jmp 0x498c47
mov edi, dword [edi]
jmp 0x498c47
mov edi, 0x4d0335
push 4
push str.Read
push edi
call fcn.004b2c54
add esp, 0xc
test eax, eax
jne 0x498c8d
cmp byte [edi + 4], 0
lea eax, [edi + 4]
jne 0x498c6e
mov esi, 1
jmp 0x498dd4
push str.Line
push eax
call fcn.004b218a
add esp, 8
mov esi, eax
neg esi
sbb esi, esi
and esi, 2
add esi, 3
jmp 0x498dd4
push 5
push str.Write
push edi
call fcn.004b2c54
add esp, 0xc
test eax, eax
jne 0x498cd2
cmp byte [edi + 5], 0
lea eax, [edi + 5]
jne 0x498cb4
mov esi, 2
jmp 0x498dd4
push str.Line
push eax
call fcn.004b218a
add esp, 8
mov esi, eax
neg esi
sbb esi, esi
neg esi
add esi, 4
jmp 0x498dd4
push str.RawRead
push edi
call fcn.004b218a
add esp, 8
test eax, eax
jne 0x498cec
lea esi, [eax + 6]
jmp 0x498dd4
push str.RawWrite
push edi
call fcn.004b218a
add esp, 8
test eax, eax
jne 0x498d06
lea esi, [eax + 6]
jmp 0x498dd4
push 0x4d6938
push edi
call fcn.004b218a
add esp, 8
test eax, eax
je 0x498dcf
push str.Length
push edi
call fcn.004b218a
add esp, 8
test eax, eax
jne 0x498d36
lea esi, [eax + 9]
jmp 0x498dd4
push str.AtEOF
push edi
call fcn.004b218a
add esp, 8
test eax, eax
jne 0x498d50
lea esi, [eax + 0xa]
jmp 0x498dd4
push str.__Handle
push edi
call fcn.004b218a
add esp, 8
test eax, eax
jne 0x498d67
lea esi, [eax + 0xb]
jmp 0x498dd4
push str.Encoding
push edi
call fcn.004b218a
add esp, 8
test eax, eax
jne 0x498d7e
lea esi, [eax + 0xc]
jmp 0x498dd4
push str.Close
push edi
call fcn.004b218a
add esp, 8
test eax, eax
jne 0x498d95
lea esi, [eax + 0xd]
jmp 0x498dd4
push str.Position
push edi
call fcn.004b218a
add esp, 8
test eax, eax
je 0x498dcf
push str.Seek
push edi
call fcn.004b218a
add esp, 8
test eax, eax
je 0x498dcf
push str.Tell
push edi
call fcn.004b218a
add esp, 8
test eax, eax
jne 0x49979a
mov esi, 8
mov ecx, dword [ebp + 0x14]
test cl, 2
jne 0x498df5
cmp esi, 7
jb 0x499256
mov eax, dword [ebp + 0x1c]
and ecx, 1
cmp eax, ecx
jne 0x499256
jmp 0x498df8
mov eax, dword [ebp + 0x1c]
mov ebx, dword [ebp + 0xc]
lea ecx, [esi - 1]
mov dword [ebx + 8], 1
cmp ecx, 0xc
ja case.0x498e75.69
jmp dword [ecx*4 + 0x4997c0]
mov al, byte [edi]
cmp al, 0x52
je 0x498e23
cmp al, 0x72
je 0x498e23
xor al, al
jmp 0x498e25
mov al, 1
movzx esi, al
xor esi, 1
mov byte [esp + 0x13], al
add esi, edi
xor edi, edi
mov cl, byte [esi + 4]
call fcn.00412890
cmp al, 0x55
jne 0x498e48
mov dword [esp + 0x14], edi
lea eax, [edi + 5]
jmp 0x498e55
mov dword [esp + 0x14], 1
mov eax, 4
mov cl, byte [esi + eax]
add esi, eax
call fcn.00412890
movsx eax, al
add eax, 0xffffffbd
cmp eax, 0x10
ja case.0x498e75.69
movzx eax, byte [eax + 0x499810]
jmp dword [eax*4 + 0x4997f4]
push 0x36
push esi
call fcn.004b7be9
add esp, 8
mov esi, eax
neg esi
sbb esi, esi
and esi, 4
add esi, 4
jmp 0x498eb7
mov esi, 2
jmp 0x498eb7
mov esi, 1
jmp 0x498eb7
mov esi, 8
lea edi, [esi - 7]
jmp 0x498eb7
mov edi, 1
mov esi, 4
cmp byte [esp + 0x13], 0
je 0x498fa5
mov ecx, dword [ebp + 8]
lea eax, [esp + 0x20]
push esi
xorps xmm0, xmm0
push eax
lea ecx, [ecx + 8]
movlpd qword [esp + 0x28], xmm0
call fcn.00498540
test eax, eax
je case.0x498e75.69
test edi, edi
je 0x498f2c
cmp esi, 4
jne 0x498f0d
movss xmm0, dword [esp + 0x20]
lea eax, [esi - 3]
cvtps2pd xmm0, xmm0
mov dword [ebx + 8], 2
movsd qword [ebx], xmm0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x18
movsd xmm0, qword [esp + 0x20]
mov eax, 1
movsd qword [ebx], xmm0
mov dword [ebx + 8], 2
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x18
cmp dword [esp + 0x14], 0
je 0x498f8a
sub esi, 1
je 0x498f71
sub esi, 1
je 0x498f58
sub esi, 2
jne 0x498f8a
mov eax, dword [esp + 0x20]
cdq
mov dword [ebx], eax
lea eax, [esi + 1]
mov dword [ebx + 4], edx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x18
movsx eax, word [esp + 0x20]
cdq
mov dword [ebx], eax
mov eax, 1
mov dword [ebx + 4], edx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x18
movsx eax, byte [esp + 0x20]
cdq
mov dword [ebx], eax
mov eax, 1
mov dword [ebx + 4], edx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x18
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x24]
mov dword [ebx], eax
mov eax, 1
mov dword [ebx + 4], edx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x18
cmp dword [ebp + 0x1c], 1
jne case.0x498e75.69
mov eax, dword [ebp + 0x18]
mov ecx, dword [eax + 4]
test edi, edi
je 0x498fdf
push 0
mov edx, 1
call fcn.0046b9f0
add esp, 4
movsd qword [esp + 0x20], xmm0
cmp esi, 4
jne 0x499040
cvtsd2ss xmm0, xmm0
movss dword [esp + 0x20], xmm0
jmp 0x499040
cmp esi, 8
jne 0x499031
cmp dword [esp + 0x14], 0
jne 0x499031
mov eax, dword [ecx + 8]
cmp eax, 1
je 0x499031
cmp eax, 2
je 0x499031
cmp eax, 5
ja case.0x498ffd.1
jmp dword [eax*4 + 0x499824]
mov ecx, dword [ecx]
push 0
push 1
call fcn.00401680
mov ecx, eax
call fcn.004488e0
jmp 0x499038
mov eax, dword [ecx]
mov ecx, eax
call fcn.004488e0
jmp 0x499038
mov eax, 0x4d0335
mov ecx, eax
call fcn.004488e0
jmp 0x499038
xor edx, edx
call fcn.0046b990
mov dword [esp + 0x24], edx
mov dword [esp + 0x20], eax
mov ecx, dword [ebp + 8]
lea eax, [esp + 0x20]
push esi
push eax
lea ecx, [ecx + 8]
call fcn.004988d0
test eax, eax
jne 0x499068
mov ecx, dword [0x4e498c]
test byte [ecx + 0xe0], 1
jne case.0x498e75.69
mov dword [ebx], eax
mov eax, 1
mov dword [ebx + 4], 0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x18
cmp eax, 1
jg case.0x498e75.69
test eax, eax
je 0x49909d
mov eax, dword [ebp + 0x18]
xor edx, edx
mov ecx, dword [eax + 4]
call fcn.0046b990
mov esi, eax
jmp 0x4990b6
mov esi, dword [ebp + 8]
lea ecx, [esi + 8]
call fcn.00497f60
lea ecx, [esi + 8]
mov edi, eax
call fcn.00497fb0
mov esi, eax
sub esi, edi
cmp esi, 0xffffffff
je case.0x498e75.69
push esi
xor edx, edx
mov ecx, ebx
call fcn.0046bde0
add esp, 4
test eax, eax
je case.0x498e75.69
mov ecx, dword [ebp + 8]
push 0
push esi
push dword [ebx]
lea ecx, [ecx + 8]
call fcn.00498180
mov ecx, dword [ebx]
mov dword [ebx + 8], 0
mov byte [eax + ecx], 0
mov dword [ebx + 4], eax
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x18
test eax, eax
jne case.0x498e75.69
push 0x10001
call fcn.004b2c3e
add esp, 4
mov dword [ebx + 0xc], eax
test eax, eax
je case.0x498e75.69
mov ecx, dword [ebp + 8]
push 1
mov dword [ebx + 4], 0x10000
mov dword [ebx], eax
push 0xffff
mov byte [eax + 0x10000], 0
lea ecx, [ecx + 8]
push dword [ebx]
call fcn.00498180
mov ecx, dword [ebx]
mov dword [ebx + 8], 0
mov byte [eax + ecx], 0
mov dword [ebx + 4], eax
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x18
cmp eax, 1
jg case.0x498e75.69
xor ecx, ecx
xor edi, edi
mov dword [esp + 0x18], ecx
test eax, eax
je 0x49920b
mov edi, dword [ebp + 0x18]
mov edx, dword [ebx + 4]
mov ecx, dword [edi + 4]
call fcn.0046ba90
mov edi, dword [edi + 4]
mov edx, eax
mov dword [esp + 0x1c], edx
cmp dword [edi + 8], 4
jne 0x4991e0
mov edi, dword [edi]
mov cl, byte [edi + 0x17]
test cl, cl
jne 0x4991ab
mov eax, dword [edi + 0xc]
mov al, byte [eax + 0x15]
jmp 0x4991ae
mov al, byte [edi + 0x15]
test al, 1
jne 0x4991e0
test cl, cl
jne 0x4991b9
mov edi, dword [edi + 0xc]
cmp byte [edi + 0x17], 1
jne 0x4991d7
test byte [edi + 0x15], 8
je 0x4991d0
mov ecx, edi
call fcn.004015a0
mov edx, dword [esp + 0x1c]
add edi, 0xc
mov edi, dword [edi]
jmp 0x4991ee
mov edi, 0x4eb4fc
mov edi, dword [edi]
jmp 0x4991ee
mov edi, edx
lea ecx, [edi + 1]
mov al, byte [edi]
inc edi
test al, al
jne 0x4991e5
sub edi, ecx
mov ecx, dword [ebp + 8]
push edi
add ecx, 8
push edx
mov dword [esp + 0x24], ecx
call fcn.00498670
mov ecx, eax
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x18], ecx
jmp 0x499211
mov eax, dword [ebp + 8]
add eax, 8
cmp esi, 4
jne 0x499233
test ecx, ecx
jne 0x49921e
test edi, edi
jne 0x49923b
push 1
push 0x4daa28
mov ecx, eax
inc edi
call fcn.00498670
mov ecx, dword [esp + 0x18]
add ecx, eax
test ecx, ecx
jne 0x49924d
test edi, edi
je 0x49924d
mov eax, dword [0x4e498c]
test byte [eax + 0xe0], 1
jne case.0x498e75.69
mov dword [ebx], ecx
mov dword [ebx + 4], 0
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x18
cmp eax, 2
jne case.0x498e75.69
mov al, byte [edi + 3]
cmp al, 0x52
je 0x49927d
mov byte [esp + 0x13], 0
cmp al, 0x72
jne 0x499282
mov byte [esp + 0x13], 1
mov eax, dword [ebp + 0x18]
xor edx, edx
mov ecx, dword [eax + 8]
mov edi, dword [eax + 4]
call fcn.0046b990
cmp dword [edi + 8], 4
mov esi, eax
jne 0x4992fa
mov edx, dword [edi]
mov ecx, edx
call fcn.004489a0
cmp esi, eax
jbe 0x4992ed
cmp byte [esp + 0x13], 0
je 0x4992c0
push 0
push 0
push esi
push 0
mov ecx, edx
call fcn.0049e6b0
test eax, eax
jne 0x4992ed
mov eax, dword [0x4e498c]
test byte [eax + 0xe0], 1
jne case.0x498e75.69
mov dword [ebx], 0
mov eax, 1
mov dword [ebx + 4], 0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x18
mov ecx, dword [edi]
push 0
push 1
call fcn.00401680
jmp 0x499303
xor edx, edx
mov ecx, edi
call fcn.0046b990
mov ecx, eax
cmp ecx, 0x10000
jae 0x499316
xor ecx, ecx
test esi, esi
jmp 0x499239
cmp byte [esp + 0x13], 0
mov eax, dword [ebp + 8]
push esi
push ecx
lea ecx, [eax + 8]
je 0x49932c
call fcn.00498540
jmp 0x499331
call fcn.004988d0
mov ecx, eax
test ecx, ecx
jne 0x49924d
test esi, esi
jmp 0x499239
test eax, eax
jne 0x499364
mov ecx, dword [ebp + 8]
lea ecx, [ecx + 8]
call fcn.00497f60
mov dword [ebx], eax
mov eax, 1
mov dword [ebx + 4], edx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x18
cmp eax, 2
jg case.0x498e75.69
mov esi, dword [ebp + 0x18]
xor edx, edx
mov ecx, dword [esi + 4]
call fcn.0046b990
cmp dword [ebp + 0x1c], 2
mov ecx, eax
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], edx
jne 0x49939a
mov ecx, dword [esi + 8]
xor edx, edx
call fcn.0046b990
mov dword [esp + 0x14], eax
jmp 0x4993b6
test edx, edx
jg 0x4993ae
jl 0x4993a4
test ecx, ecx
jae 0x4993ae
mov dword [esp + 0x14], 2
jmp 0x4993b6
mov dword [esp + 0x14], 0
mov edi, dword [ebp + 8]
add edi, 8
mov eax, dword [edi + 0x2c]
test eax, eax
je 0x4993de
sub eax, dword [edi + 0x30]
mov ecx, edi
sub eax, dword [edi + 8]
mov esi, dword [edi]
push 1
cdq
push edx
push eax
call dword [esi + 0x14]
mov dword [edi + 0x2c], 0
jmp 0x4993f0
mov ecx, dword [edi + 8]
test ecx, ecx
je 0x4993f7
mov eax, dword [edi]
push ecx
push dword [edi + 0x30]
mov ecx, edi
call dword [eax + 0x10]
mov dword [edi + 8], 0
push dword [esp + 0x14]
mov eax, dword [edi]
mov ecx, edi
push dword [esp + 0x20]
mov byte [edi + 0x28], 0
push dword [esp + 0x20]
mov eax, dword [eax + 0x14]
call eax
test al, al
jne 0x49944a
mov eax, dword [0x4e498c]
test byte [eax + 0xe0], 1
jne case.0x498e75.69
xorps xmm0, xmm0
movlpd qword [esp + 0x20], xmm0
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x20]
mov dword [ebx], ecx
mov dword [ebx + 4], eax
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x18
mov ecx, 1
xor eax, eax
mov dword [ebx], ecx
mov dword [ebx + 4], eax
mov eax, ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x18
test eax, eax
jne 0x499483
mov ecx, dword [ebp + 8]
lea ecx, [ecx + 8]
call fcn.00497fb0
mov dword [ebx], eax
mov eax, 1
mov dword [ebx + 4], edx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x18
cmp eax, 1
jne case.0x498e75.69
mov eax, dword [ebp + 0x18]
xor edx, edx
mov ecx, dword [eax + 4]
call fcn.0046b990
mov edi, dword [ebp + 8]
add edi, 8
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], edx
mov eax, dword [edi + 0x2c]
test eax, eax
je 0x4994c9
sub eax, dword [edi + 0x30]
mov ecx, edi
sub eax, dword [edi + 8]
mov esi, dword [edi]
push 1
cdq
push edx
push eax
call dword [esi + 0x14]
mov dword [edi + 0x2c], 0
jmp 0x4994db
mov ecx, dword [edi + 8]
test ecx, ecx
je 0x4994e2
mov eax, dword [edi]
push ecx
push dword [edi + 0x30]
mov ecx, edi
call dword [eax + 0x10]
mov dword [edi + 8], 0
mov eax, dword [edi]
mov ecx, edi
mov byte [edi + 0x28], 0
mov eax, dword [eax + 0x18]
call eax
mov esi, dword [edi]
mov ecx, edi
push 0
push dword [esp + 0x18]
mov dword [esp + 0x24], eax
push dword [esp + 0x20]
mov esi, dword [esi + 0x14]
mov dword [esp + 0x2c], edx
call esi
test al, al
je 0x499558
push dword [edi + 0x34]
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
je 0x499558
mov edx, dword [esp + 0x20]
cmp dword [esp + 0x14], edx
jg 0x499535
mov ecx, dword [esp + 0x18]
jl 0x49953f
mov eax, dword [esp + 0x1c]
cmp ecx, eax
jae 0x499539
jmp 0x49953f
mov eax, dword [esp + 0x1c]
mov ecx, eax
mov dword [esp + 0x14], edx
mov eax, dword [edi]
push 0
push dword [esp + 0x18]
push ecx
mov ecx, edi
call dword [eax + 0x14]
mov eax, dword [edi]
mov ecx, edi
mov eax, dword [eax + 0x1c]
call eax
jmp 0x49955d
or eax, 0xffffffff
or edx, eax
mov dword [ebx], eax
mov dword [ebx + 4], edx
cmp eax, 0xffffffff
jne 0x499256
cmp edx, eax
jne 0x499256
mov dword [ebx], 0x4d0335
mov eax, dword [0x4e498c]
mov dword [ebx + 8], 0
test byte [eax + 0xe0], 1
je 0x499256
mov ecx, dword [0x4e9dfc]
push 0x4d0335
push str.FileObject
push 0x4d07c0
call fcn.00446950
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x18
test eax, eax
jne 0x499256
mov esi, dword [ebp + 8]
mov ecx, dword [esi + 0x34]
test ecx, ecx
je 0x4995d6
mov eax, dword [esi + 0x38]
add eax, dword [esi + 0x10]
cmp ecx, eax
jb 0x49961a
mov eax, dword [esi + 8]
lea ecx, [esi + 8]
mov eax, dword [eax + 0x18]
call eax
mov edi, eax
mov eax, edx
mov dword [esp + 0x20], eax
test eax, eax
jl 0x49944a
jg 0x4995fb
test edi, edi
jb 0x49944a
mov eax, dword [esi + 8]
lea ecx, [esi + 8]
mov eax, dword [eax + 0x1c]
call eax
cmp dword [esp + 0x20], edx
jg 0x49944a
jl 0x49961a
cmp edi, eax
jae 0x49944a
xorps xmm0, xmm0
movlpd qword [esp + 0x20], xmm0
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x20]
mov dword [ebx], ecx
mov dword [ebx + 4], eax
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x18
test eax, eax
jne 0x499256
mov edi, dword [ebp + 8]
mov eax, dword [edi + 0x34]
test eax, eax
je 0x49966d
sub eax, dword [edi + 0x38]
lea ecx, [edi + 8]
sub eax, dword [edi + 0x10]
mov esi, dword [edi + 8]
push 1
cdq
push edx
push eax
call dword [esi + 0x14]
mov dword [edi + 0x34], 0
jmp 0x499681
mov ecx, dword [edi + 0x10]
test ecx, ecx
je 0x499688
mov eax, dword [edi + 8]
push ecx
push dword [edi + 0x38]
lea ecx, [edi + 8]
call dword [eax + 0x10]
mov dword [edi + 0x10], 0
mov eax, dword [edi + 0x3c]
mov byte [edi + 0x30], 0
mov dword [ebx], eax
jmp 0x49924f
mov edi, dword [ebp + 8]
test eax, eax
jle 0x4996f7
mov esi, dword [ebp + 0x18]
mov ecx, dword [esi + 4]
call fcn.0046b880
mov ecx, dword [esi + 4]
test eax, eax
je 0x4996b8
xor edx, edx
call fcn.0046b990
jmp 0x4996e4
mov eax, dword [ecx + 8]
cmp eax, 5
ja case.0x4996c0.1
jmp dword [eax*4 + 0x49983c]
mov ecx, dword [ecx]
push 0
push 1
call fcn.00401680
jmp 0x4996dd
mov eax, dword [ecx]
jmp 0x4996dd
mov eax, 0x4d0335
mov ecx, eax
call fcn.0042a260
cmp eax, 0xffffffff
je 0x4996f7
and eax, 0x7fffffff
lea ecx, [edi + 8]
push eax
call fcn.004047a0
mov ecx, dword [edi + 0x18]
cmp ecx, 0x4b0
je 0x499754
cmp ecx, 0xfde9
je 0x499738
mov esi, dword [ebx + 4]
push 0xa
lea eax, [esi + 2]
mov word [esi], 0x5043
push eax
push ecx
call fcn.004b20b1
add esp, 0xc
mov dword [ebx + 8], 0
mov dword [ebx], esi
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x18
mov esi, str.UTF_8
mov dword [ebx + 8], 0
mov dword [ebx], esi
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x18
mov esi, str.UTF_16
mov dword [ebx + 8], 0
mov dword [ebx], esi
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x18
test eax, eax
jne 0x49977f
mov ecx, dword [ebp + 8]
lea ecx, [ecx + 8]
call fcn.00404770
mov dword [ebx + 8], 0
mov eax, 1
mov dword [ebx], 0x4d0335
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x18
pop edi
pop esi
mov eax, 4
pop ebx
mov esp, ebp
pop ebp
ret 0x18