Function at 0x40594f
Capabilities:
Read file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x1a4]
sub esp, 0x224
mov eax, dword [0x4705d0]
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.004464f0
push esi
lea eax, [ebp - 0x67]
push ebx
push eax
mov byte [ebp - 0x68], bl
call fcn.004464f0
mov esi, dword [ebp + 0x1b0]
add esp, 0x18
cmp esi, ebx
jl 0x4059b1
mov dword [ebp - 0x70], esi
jmp 0x4059fa
xor esi, esi
mov edi, 0x472858
cmp dword [esi*4 + 0x473bec], ebx
jne 0x4059d5
cmp byte [edi], bl
je 0x4059e1
push str.Untitled
push edi
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
je 0x4059e1
inc esi
add edi, 0x104
cmp esi, 8
jl 0x4059b8
push ebx
push ebx
push 0x1304
push dword [0x47243c]
mov dword [ebp - 0x70], esi
call dword [sym.imp.USER32.dll_SendMessageA]
mov edi, dword [ebp - 0x80]
cmp esi, 8
jl 0x405a26
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 0x405f18
cmp edi, ebx
je 0x405f09
cmp byte [edi], bl
je 0x405f09
cmp esi, 7
ja 0x405f09
push edi
mov edi, dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea eax, [ebp + 0x9c]
push eax
call edi
push ebx
push ebx
push 0x4597fe
push 0x45aca0
lea eax, [ebp + 0x9c]
push eax
call fcn.0043fa75
push 7
push ebx
lea eax, [ebp + 0x9c]
push eax
call fcn.0043fbb2
push 8
push ebx
lea eax, [ebp + 0x9c]
push eax
call fcn.0043fbb2
lea eax, [ebp + 0x9c]
push eax
call fcn.0040bf89
test eax, eax
lea eax, [ebp + 0x9c]
push eax
jne 0x405abd
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 0x405a1d
call fcn.0040d86d
mov dword [ebp - 0x80], eax
cmp eax, 1
jae 0x405b10
imul esi, esi, 0x104
lea eax, [esi + 0x472858]
cmp eax, ebx
je 0x405ae4
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 [0x472454]
call esi
push ebx
push ebx
push 0x102f
push dword [0x472454]
call esi
xor eax, eax
inc eax
jmp 0x405f26
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 0x405b50
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 0x405aae
mov ecx, dword [ebp - 0x80]
add ecx, 0x100
mov eax, 0x1000
cmp ecx, eax
jbe 0x405b64
mov eax, ecx
push 1
push eax
call fcn.004462a8
mov edi, eax
pop ecx
pop ecx
mov dword [ebp - 0x7c], edi
cmp edi, ebx
jne 0x405b96
cmp esi, ebx
je 0x405b82
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x12030
push str.vTask_Error
push str.Out_of_memory
jmp 0x405f18
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 0x405ee4
mov eax, dword [ebp - 0x78]
cmp eax, 1
jb 0x405ee4
mov byte [eax + edi], bl
cmp byte [edi], 0x4d
mov esi, dword [ebp - 0x78]
jne 0x405d03
cmp byte [edi + 1], 0x5a
jne 0x405d03
push esi
push edi
push ebx
push 0x232a
lea eax, [ebp + 0x9c]
push eax
call fcn.0040fcce
mov dword [ebp - 0x6c], eax
lea eax, [ebp + 0x9c]
push eax
call fcn.0040d86d
cmp ebx, edx
jb 0x405c0e
ja 0x405c0b
cmp dword [ebp - 0x6c], eax
jbe 0x405c0e
mov dword [ebp - 0x6c], ebx
cmp dword [ebp - 0x6c], ebx
jne 0x405cac
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.0040d86d
cmp ebx, edx
jb 0x405c59
ja 0x405c56
cmp dword [ebp - 0x6c], eax
jbe 0x405c59
mov dword [ebp - 0x6c], ebx
cmp dword [ebp - 0x78], ebx
je 0x405cac
cmp dword [ebp - 0x6c], ebx
jbe 0x405cac
lea eax, [esi - 4]
cmp dword [ebp - 0x6c], eax
jbe 0x405c6e
mov dword [ebp - 0x6c], eax
sub esi, dword [ebp - 0x6c]
add esi, edi
lea eax, [esi - 4]
test eax, eax
je 0x405c8f
cmp dword [ebp - 0x6c], ebx
jbe 0x405c8f
push dword [ebp - 0x6c]
add esi, 0xfffffffc
push esi
push edi
call fcn.00446570
add esp, 0xc
xor eax, eax
cmp dword [ebp - 0x6c], ebx
je 0x405cac
cmp eax, dword [ebp - 0x6c]
jae 0x405cac
xor byte [eax + edi], 0x71
inc eax
cmp eax, dword [ebp - 0x6c]
jae 0x405c91
xor byte [eax + edi], 0x34
inc eax
jmp 0x405c91
cmp dword [ebp - 0x74], ebx
je 0x405cba
push dword [ebp - 0x74]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x6c], 1
jae 0x405cf0
push edi
call fcn.00445e06
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 0x405a1d
lea eax, [ebp - 0x6c]
push eax
push edi
call fcn.004457c4
pop ecx
mov edi, eax
pop ecx
mov dword [ebp - 0x7c], edi
jmp 0x405d5b
cmp dword [ebp - 0x74], ebx
je 0x405d11
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 + 0x473078]
push edi
mov byte [esi], bl
call fcn.00445d80
pop ecx
pop ecx
cmp eax, ebx
jne 0x405d44
push str._VistaTask
push edi
call fcn.00445d80
pop ecx
pop ecx
cmp eax, ebx
je 0x405d5b
sub eax, edi
inc eax
mov ecx, 0x103
cmp eax, ecx
jle 0x405d52
mov eax, ecx
push eax
push edi
push esi
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
cmp edi, ebx
je 0x405ec6
push str._action
push edi
call fcn.004010ff
pop ecx
pop ecx
test eax, eax
jne 0x405d9a
push str._vTask
push edi
call fcn.004010ff
pop ecx
pop ecx
test eax, eax
jne 0x405d9a
push str._VistaTask
push edi
call fcn.004010ff
pop ecx
pop ecx
test eax, eax
je 0x405ebf
mov eax, dword [ebp - 0x70]
imul eax, eax, 0x104
lea eax, [eax + 0x472858]
cmp eax, ebx
je 0x405dbb
lea ecx, [ebp + 0x9c]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov edi, dword [ebp - 0x70]
push 0x45abd8
push dword [ebp - 0x7c]
shl edi, 2
mov dword [edi + 0x472614], ebx
call fcn.00445d80
mov esi, eax
pop ecx
pop ecx
cmp esi, ebx
je 0x405e5a
push 0x45abd8
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add esi, eax
mov al, byte [esi]
cmp al, 0xd
jne 0x405e0d
cmp byte [esi + 1], 0xa
jne 0x405e01
or dword [edi + 0x472614], 0x4000
jmp 0x405e26
or dword [edi + 0x472614], 0x2000
jmp 0x405e26
cmp al, 0xa
jne 0x405e26
or dword [edi + 0x472614], 0x1000
jmp 0x405e26
cmp al, 0xd
je 0x405e25
cmp al, 0xa
jne 0x405e2c
inc esi
mov al, byte [esi]
cmp al, bl
jne 0x405e1d
cmp byte [esi], 9
jne 0x405e3b
or dword [edi + 0x472614], 0x100
xor ecx, ecx
jmp 0x405e4e
cmp al, 0x20
je 0x405e47
cmp al, 9
jne 0x405e54
cmp ecx, 0x20
jge 0x405e54
inc ecx
inc esi
mov al, byte [esi]
cmp al, bl
jne 0x405e3f
or dword [edi + 0x472614], ecx
push ebx
push 0xffffffffffffffff
push dword [ebp - 0x70]
push dword [ebp - 0x7c]
call fcn.004019f4
push dword [ebp - 0x7c]
call fcn.00445e06
mov dword [esp], str.stats_active
mov esi, str.SOFTWARE_vTaskReport
push esi
push ebx
call fcn.00401241
add esp, 0xc
test eax, eax
je 0x405eb6
push str.stats_longest_script
push esi
push ebx
call fcn.00401241
mov ecx, dword [edi + 0x4725d4]
add esp, 0xc
inc ecx
cmp eax, ecx
jg 0x405ea6
mov eax, ecx
push eax
push str.stats_longest_script
push esi
push ebx
call fcn.004012a6
add esp, 0x10
mov eax, dword [edi + 0x4725d4]
inc eax
jmp 0x405f26
push edi
call fcn.00445e06
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 0x405cdf
push edi
call fcn.00445e06
pop ecx
cmp esi, ebx
je 0x405ef6
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x12030
lea eax, [ebp + 0x9c]
push eax
push str.Unable_to_read_file
jmp 0x405f18
push 0x12030
push str.__r_n
push str.Invalid_File
push dword [0x472420]
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.004464bf
add ebp, 0x1a4
leave
ret 0xc