Function at 0x406960
Capabilities:
Read file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x1a4]
sub esp, 0x224
mov eax, dword [0x4755d0]
xor eax, ebp
mov dword [ebp + 0x1a0], eax
push ebx
push esi
push edi
mov edi, dword [ebp + 0x1ac]
mov esi, 0x103
xor ebx, ebx
push esi
lea eax, [ebp + 0x9d]
push ebx
push eax
mov dword [ebp - 0x80], edi
mov byte [ebp + 0x9c], bl
call fcn.00448090
push esi
lea eax, [ebp - 0x67]
push ebx
push eax
mov byte [ebp - 0x68], bl
call fcn.00448090
mov esi, dword [ebp + 0x1b0]
add esp, 0x18
cmp esi, ebx
jl 0x4069c2
mov dword [ebp - 0x70], esi
jmp 0x406a0b
xor esi, esi
mov edi, 0x4775d8
cmp dword [esi*4 + 0x478a70], ebx
jne 0x4069e6
cmp byte [edi], bl
je 0x4069f2
push str.Untitled
push edi
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
je 0x4069f2
inc esi
add edi, 0x104
cmp esi, 8
jl 0x4069c9
push ebx
push ebx
push 0x1304
push dword [0x4771bc]
mov dword [ebp - 0x70], esi
call dword [sym.imp.USER32.dll_SendMessageA]
mov edi, dword [ebp - 0x80]
cmp esi, 8
jl 0x406a3c
push 8
push str.A_maximum_of__d_files_may_be_opened_in_vTask._n_nPlease_close_a_file_before_opening_another_one.
lea eax, [ebp - 0x68]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
lea eax, [ebp - 0x68]
push eax
call fcn.00448491
push 0x45c850
call fcn.00448491
add esp, 0x14
jmp 0x406f0e
cmp edi, ebx
je 0x406ef7
cmp byte [edi], bl
je 0x406ef7
cmp esi, 7
ja 0x406ef7
push edi
mov edi, dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea eax, [ebp + 0x9c]
push eax
call edi
push ebx
push ebx
push 0x45c970
push 0x45ddf8
lea eax, [ebp + 0x9c]
push eax
call fcn.0044168f
push 7
push ebx
lea eax, [ebp + 0x9c]
push eax
call fcn.004417cc
push 8
push ebx
lea eax, [ebp + 0x9c]
push eax
call fcn.004417cc
lea eax, [ebp + 0x9c]
push eax
call fcn.0040d00f
test eax, eax
lea eax, [ebp + 0x9c]
push eax
jne 0x406abc
push str.Unable_to_open_file__s_n_nFile_does_not_exist
jmp 0x406a17
call fcn.0040e912
mov dword [ebp - 0x80], eax
cmp eax, 1
jae 0x406b0f
imul esi, esi, 0x104
lea eax, [esi + 0x4775d8]
cmp eax, ebx
je 0x406ae3
lea ecx, [ebp + 0x9c]
push ecx
push eax
call edi
mov esi, dword [sym.imp.USER32.dll_SendMessageA]
push ebx
push ebx
push 0x1009
push dword [0x4771d4]
call esi
push ebx
push ebx
push 0x102f
push dword [0x4771d4]
call esi
xor eax, eax
inc eax
jmp 0x406f10
push ebx
push 0x80
push 3
push ebx
push 1
push SysReAllocString
lea eax, [ebp + 0x9c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
mov dword [ebp - 0x74], esi
cmp esi, 0xffffffff
jne 0x406b63
lea eax, [ebp + 0x9c]
push eax
push str.Unable_to_open_file__s__n_nPlease_verify_that_the_file_is_not_open_in_another_program.
call dword [sym.imp.USER32.dll_wsprintfA]
lea eax, [ebp - 0x68]
push eax
call fcn.00448491
push 0x45c850
call fcn.00448491
add esp, 0x10
jmp 0x406f0e
mov ecx, dword [ebp - 0x80]
add ecx, 0x100
mov eax, 0x1000
cmp ecx, eax
jbe 0x406b77
mov eax, ecx
push 1
push eax
call fcn.00447e84
mov edi, eax
pop ecx
pop ecx
mov dword [ebp - 0x7c], edi
cmp edi, ebx
jne 0x406b9f
cmp esi, ebx
je 0x406b95
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push str.Out_of_memory
jmp 0x406efc
push ebx
push ebx
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push ebx
lea eax, [ebp - 0x78]
push eax
push dword [ebp - 0x80]
push edi
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x406ede
mov eax, dword [ebp - 0x78]
cmp eax, 1
jb 0x406ede
mov byte [eax + edi], bl
cmp byte [edi], 0x4d
mov esi, dword [ebp - 0x78]
jne 0x406d14
cmp byte [edi + 1], 0x5a
jne 0x406d14
push ebx
push esi
push edi
push ebx
push 0x232a
lea eax, [ebp + 0x9c]
push eax
call fcn.00410db2
mov dword [ebp - 0x6c], eax
lea eax, [ebp + 0x9c]
push eax
call fcn.0040e912
cmp ebx, edx
jb 0x406c18
ja 0x406c15
cmp dword [ebp - 0x6c], eax
jbe 0x406c18
mov dword [ebp - 0x6c], ebx
cmp dword [ebp - 0x6c], ebx
jne 0x406cb6
push ebx
push ebx
lea eax, [esi - 4]
push eax
push dword [ebp - 0x74]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 4
pop eax
push ebx
lea ecx, [ebp - 0x78]
push ecx
push eax
mov dword [ebp - 0x78], eax
lea eax, [ebp - 0x6c]
push eax
push dword [ebp - 0x74]
call dword [sym.imp.KERNEL32.dll_ReadFile]
lea eax, [ebp + 0x9c]
push eax
call fcn.0040e912
cmp ebx, edx
jb 0x406c63
ja 0x406c60
cmp dword [ebp - 0x6c], eax
jbe 0x406c63
mov dword [ebp - 0x6c], ebx
cmp dword [ebp - 0x78], ebx
je 0x406cb6
cmp dword [ebp - 0x6c], ebx
jbe 0x406cb6
lea eax, [esi - 4]
cmp dword [ebp - 0x6c], eax
jbe 0x406c78
mov dword [ebp - 0x6c], eax
sub esi, dword [ebp - 0x6c]
add esi, edi
lea eax, [esi - 4]
test eax, eax
je 0x406c99
cmp dword [ebp - 0x6c], ebx
jbe 0x406c99
push dword [ebp - 0x6c]
add esi, 0xfffffffc
push esi
push edi
call fcn.00448130
add esp, 0xc
xor eax, eax
cmp dword [ebp - 0x6c], ebx
je 0x406cb6
cmp eax, dword [ebp - 0x6c]
jae 0x406cb6
xor byte [eax + edi], 0x71
inc eax
cmp eax, dword [ebp - 0x6c]
jae 0x406c9b
xor byte [eax + edi], 0x34
inc eax
jmp 0x406c9b
cmp dword [ebp - 0x74], ebx
je 0x406cc4
push dword [ebp - 0x74]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x6c], 1
jae 0x406d01
push edi
call fcn.00447ab6
lea eax, [ebp + 0x9c]
push eax
lea eax, [ebp - 0x68]
push str.Unable_to_read___s_
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
lea eax, [ebp - 0x68]
push eax
call fcn.00448491
push 0x45c850
call fcn.00448491
add esp, 0x18
jmp 0x406f0e
lea eax, [ebp - 0x6c]
push eax
push edi
call fcn.004474ac
pop ecx
mov edi, eax
pop ecx
mov dword [ebp - 0x7c], edi
jmp 0x406d6c
cmp dword [ebp - 0x74], ebx
je 0x406d22
push dword [ebp - 0x74]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [ebp - 0x70]
imul esi, esi, 0x104
push str._vTask
lea esi, [esi + 0x477df8]
push edi
mov byte [esi], bl
call fcn.00447a30
pop ecx
pop ecx
cmp eax, ebx
jne 0x406d55
push str._VistaTask
push edi
call fcn.00447a30
pop ecx
pop ecx
cmp eax, ebx
je 0x406d6c
sub eax, edi
inc eax
mov ecx, 0x103
cmp eax, ecx
jle 0x406d63
mov eax, ecx
push eax
push edi
push esi
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
cmp edi, ebx
je 0x406ecd
push str._action
push edi
call fcn.004010ff
pop ecx
pop ecx
test eax, eax
jne 0x406dab
push str._vTask
push edi
call fcn.004010ff
pop ecx
pop ecx
test eax, eax
jne 0x406dab
push str._VistaTask
push edi
call fcn.004010ff
pop ecx
pop ecx
test eax, eax
je 0x406ec6
mov eax, dword [ebp - 0x70]
imul eax, eax, 0x104
lea eax, [eax + 0x4775d8]
cmp eax, ebx
je 0x406dcc
lea ecx, [ebp + 0x9c]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov edi, dword [ebp - 0x70]
push 0x45dd2c
push dword [ebp - 0x7c]
mov dword [edi*4 + 0x477394], ebx
call fcn.00447a30
mov esi, eax
pop ecx
pop ecx
cmp esi, ebx
je 0x406e72
push 0x45dd2c
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add esi, eax
mov al, byte [esi]
cmp al, 0xd
jne 0x406e22
cmp byte [esi + 1], 0xa
jne 0x406e15
or dword [edi*4 + 0x477394], 0x4000
jmp 0x406e3c
or dword [edi*4 + 0x477394], 0x2000
jmp 0x406e3c
cmp al, 0xa
jne 0x406e3c
or dword [edi*4 + 0x477394], 0x1000
jmp 0x406e3c
cmp al, 0xd
je 0x406e3b
cmp al, 0xa
jne 0x406e42
inc esi
mov al, byte [esi]
cmp al, bl
jne 0x406e33
cmp byte [esi], 9
jne 0x406e52
or dword [edi*4 + 0x477394], 0x100
xor ecx, ecx
jmp 0x406e65
cmp al, 0x20
je 0x406e5e
cmp al, 9
jne 0x406e6b
cmp ecx, 0x20
jge 0x406e6b
inc ecx
inc esi
mov al, byte [esi]
cmp al, bl
jne 0x406e56
or dword [edi*4 + 0x477394], ecx
push ebx
push 0xffffffffffffffff
push dword [ebp - 0x70]
push dword [ebp - 0x7c]
call fcn.00403974
push dword [ebp - 0x7c]
call fcn.00447ab6
pop ecx
push ebx
push ebx
push str.SOFTWARE_vTaskReport_stats_active
call fcn.0040225d
test eax, eax
je 0x406ebc
push ebx
push ebx
mov esi, str.SOFTWARE_vTaskReport_stats_longest_script
push esi
call fcn.0040225d
mov ecx, dword [edi*4 + 0x477354]
inc ecx
cmp eax, ecx
jg 0x406eb4
mov eax, ecx
push ebx
push eax
push esi
call fcn.00402396
mov eax, dword [edi*4 + 0x477354]
inc eax
jmp 0x406f10
push edi
call fcn.00447ab6
pop ecx
lea eax, [ebp + 0x9c]
push eax
push str.__s__does_not_appear_to_contain_vTask_actions
jmp 0x406a17
push edi
call fcn.00447ab6
pop ecx
cmp esi, ebx
je 0x406ef0
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push str.Unable_to_read_file
jmp 0x406efc
push str.Invalid_File
call fcn.00448491
mov dword [esp], 0x45c850
call fcn.00448491
pop ecx
xor eax, eax
mov ecx, dword [ebp + 0x1a0]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00448080
add ebp, 0x1a4
leave
ret 0xc