Function at 0x406960
Capabilities:
Read file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x1a4]
sub esp, 0x224
mov eax, dword [0x47e5d0]
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.00452e00
push esi
lea eax, [ebp - 0x67]
push ebx
push eax
mov byte [ebp - 0x68], bl
call fcn.00452e00
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, 0x4804f8
cmp dword [esi*4 + 0x481990], 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 [0x4800dc]
mov dword [ebp - 0x70], esi
call dword [sym.imp.USER32.dll_SendMessageA]
mov edi, dword [ebp - 0x80]
cmp esi, 8
jl 0x406a37
push 8
lea eax, [ebp - 0x68]
push str.A_maximum_of__d_files_may_be_opened_in_vTask._n_nPlease_close_a_file_before_opening_another_one.
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
push 0x12030
push str.vTask_Warning
lea eax, [ebp - 0x68]
push eax
jmp 0x406f20
cmp edi, ebx
je 0x406f11
cmp byte [edi], bl
je 0x406f11
cmp esi, 7
ja 0x406f11
push edi
mov edi, dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea eax, [ebp + 0x9c]
push eax
call edi
push ebx
push ebx
push 0x464a50
push 0x465ee0
lea eax, [ebp + 0x9c]
push eax
call fcn.0044923e
push 7
push ebx
lea eax, [ebp + 0x9c]
push eax
call fcn.0044937b
push 8
push ebx
lea eax, [ebp + 0x9c]
push eax
call fcn.0044937b
lea eax, [ebp + 0x9c]
push eax
call fcn.00410370
test eax, eax
lea eax, [ebp + 0x9c]
push eax
jne 0x406ace
lea eax, [ebp - 0x68]
push str.Unable_to_open_file__s_n_nFile_does_not_exist
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
push 0x12030
push str.vTask_Error
jmp 0x406a2e
call fcn.00411c73
mov dword [ebp - 0x80], eax
cmp eax, 1
jae 0x406b21
imul esi, esi, 0x104
lea eax, [esi + 0x4804f8]
cmp eax, ebx
je 0x406af5
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 [0x4800f4]
call esi
push ebx
push ebx
push 0x102f
push dword [0x4800f4]
call esi
xor eax, eax
inc eax
jmp 0x406f2e
push ebx
push 0x80
push 3
push ebx
push 1
push SQLAllocEnv
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 0x406b61
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]
pop ecx
pop ecx
jmp 0x406abf
mov ecx, dword [ebp - 0x80]
add ecx, 0x100
mov eax, 0x1000
cmp ecx, eax
jbe 0x406b75
mov eax, ecx
push 1
push eax
call fcn.00452b24
mov edi, eax
pop ecx
pop ecx
mov dword [ebp - 0x7c], edi
cmp edi, ebx
jne 0x406ba7
cmp esi, ebx
je 0x406b93
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x12030
push str.vTask_Error
push str.Out_of_memory
jmp 0x406f20
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 0x406eec
mov eax, dword [ebp - 0x78]
cmp eax, 1
jb 0x406eec
mov byte [eax + edi], bl
cmp byte [edi], 0x4d
mov esi, dword [ebp - 0x78]
jne 0x406d15
cmp byte [edi + 1], 0x5a
jne 0x406d15
push ebx
push esi
push edi
push ebx
push 0x232a
lea eax, [ebp + 0x9c]
push eax
call fcn.004142ac
mov dword [ebp - 0x6c], eax
lea eax, [ebp + 0x9c]
push eax
call fcn.00411c73
cmp ebx, edx
jb 0x406c20
ja 0x406c1d
cmp dword [ebp - 0x6c], eax
jbe 0x406c20
mov dword [ebp - 0x6c], ebx
cmp dword [ebp - 0x6c], ebx
jne 0x406cbe
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.00411c73
cmp ebx, edx
jb 0x406c6b
ja 0x406c68
cmp dword [ebp - 0x6c], eax
jbe 0x406c6b
mov dword [ebp - 0x6c], ebx
cmp dword [ebp - 0x78], ebx
je 0x406cbe
cmp dword [ebp - 0x6c], ebx
jbe 0x406cbe
lea eax, [esi - 4]
cmp dword [ebp - 0x6c], eax
jbe 0x406c80
mov dword [ebp - 0x6c], eax
sub esi, dword [ebp - 0x6c]
add esi, edi
lea eax, [esi - 4]
test eax, eax
je 0x406ca1
cmp dword [ebp - 0x6c], ebx
jbe 0x406ca1
push dword [ebp - 0x6c]
add esi, 0xfffffffc
push esi
push edi
call fcn.00452ea0
add esp, 0xc
xor eax, eax
cmp dword [ebp - 0x6c], ebx
je 0x406cbe
cmp eax, dword [ebp - 0x6c]
jae 0x406cbe
xor byte [eax + edi], 0x71
inc eax
cmp eax, dword [ebp - 0x6c]
jae 0x406ca3
xor byte [eax + edi], 0x34
inc eax
jmp 0x406ca3
cmp dword [ebp - 0x74], ebx
je 0x406ccc
push dword [ebp - 0x74]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x6c], 1
jae 0x406d02
push edi
call fcn.00452756
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]
add esp, 0x10
push 0x12030
lea eax, [ebp + 0x9c]
push eax
jmp 0x406a2e
lea eax, [ebp - 0x6c]
push eax
push edi
call fcn.00452213
pop ecx
mov edi, eax
pop ecx
mov dword [ebp - 0x7c], edi
jmp 0x406d6d
cmp dword [ebp - 0x74], ebx
je 0x406d23
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 + 0x480d18]
push edi
mov byte [esi], bl
call fcn.004526d0
pop ecx
pop ecx
cmp eax, ebx
jne 0x406d56
push str._VistaTask
push edi
call fcn.004526d0
pop ecx
pop ecx
cmp eax, ebx
je 0x406d6d
sub eax, edi
inc eax
mov ecx, 0x103
cmp eax, ecx
jle 0x406d64
mov eax, ecx
push eax
push edi
push esi
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
cmp edi, ebx
je 0x406ece
push str._action
push edi
call fcn.004010ff
pop ecx
pop ecx
test eax, eax
jne 0x406dac
push str._vTask
push edi
call fcn.004010ff
pop ecx
pop ecx
test eax, eax
jne 0x406dac
push str._VistaTask
push edi
call fcn.004010ff
pop ecx
pop ecx
test eax, eax
je 0x406ec7
mov eax, dword [ebp - 0x70]
imul eax, eax, 0x104
lea eax, [eax + 0x4804f8]
cmp eax, ebx
je 0x406dcd
lea ecx, [ebp + 0x9c]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov edi, dword [ebp - 0x70]
push 0x465e18
push dword [ebp - 0x7c]
mov dword [edi*4 + 0x4802b4], ebx
call fcn.004526d0
mov esi, eax
pop ecx
pop ecx
cmp esi, ebx
je 0x406e73
push 0x465e18
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add esi, eax
mov al, byte [esi]
cmp al, 0xd
jne 0x406e23
cmp byte [esi + 1], 0xa
jne 0x406e16
or dword [edi*4 + 0x4802b4], 0x4000
jmp 0x406e3d
or dword [edi*4 + 0x4802b4], 0x2000
jmp 0x406e3d
cmp al, 0xa
jne 0x406e3d
or dword [edi*4 + 0x4802b4], 0x1000
jmp 0x406e3d
cmp al, 0xd
je 0x406e3c
cmp al, 0xa
jne 0x406e43
inc esi
mov al, byte [esi]
cmp al, bl
jne 0x406e34
cmp byte [esi], 9
jne 0x406e53
or dword [edi*4 + 0x4802b4], 0x100
xor ecx, ecx
jmp 0x406e66
cmp al, 0x20
je 0x406e5f
cmp al, 9
jne 0x406e6c
cmp ecx, 0x20
jge 0x406e6c
inc ecx
inc esi
mov al, byte [esi]
cmp al, bl
jne 0x406e57
or dword [edi*4 + 0x4802b4], ecx
push ebx
push 0xffffffffffffffff
push dword [ebp - 0x70]
push dword [ebp - 0x7c]
call fcn.0040395e
push dword [ebp - 0x7c]
call fcn.00452756
pop ecx
push ebx
push ebx
push str.SOFTWARE_vTaskReport_stats_active
call fcn.0040225d
test eax, eax
je 0x406ebd
push ebx
push ebx
mov esi, str.SOFTWARE_vTaskReport_stats_longest_script
push esi
call fcn.0040225d
mov ecx, dword [edi*4 + 0x480274]
inc ecx
cmp eax, ecx
jg 0x406eb5
mov eax, ecx
push ebx
push eax
push esi
call fcn.00402396
mov eax, dword [edi*4 + 0x480274]
inc eax
jmp 0x406f2e
push edi
call fcn.00452756
pop ecx
lea eax, [ebp + 0x9c]
push eax
lea eax, [ebp - 0x68]
push str.__s__does_not_appear_to_contain_vTask_actions
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
jmp 0x406cf1
push edi
call fcn.00452756
pop ecx
cmp esi, ebx
je 0x406efe
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x12030
lea eax, [ebp + 0x9c]
push eax
push str.Unable_to_read_file
jmp 0x406f20
push 0x12030
push str.__r_n
push str.Invalid_File
push dword [0x4800c0]
call dword [sym.imp.USER32.dll_MessageBoxA]
xor eax, eax
mov ecx, dword [ebp + 0x1a0]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00452dee
add ebp, 0x1a4
leave
ret 0xc