Function at 0x417c00
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x476d56
mov eax, dword fs:[0]
push eax
sub esp, 0x130
mov eax, dword [0x4b34c4]
xor eax, esp
mov dword [esp + 0x128], eax
push ebx
push esi
push edi
mov eax, dword [0x4b34c4]
xor eax, esp
push eax
lea eax, [esp + 0x140]
mov dword fs:[0], eax
mov eax, dword [ebp + 0xc]
push str.ReadDataEVENT
push 1
mov dword [esp + 0x20], eax
xor eax, eax
xor ebx, ebx
push 1
push ebx
mov edi, edx
mov dword [esp + 0x24], ecx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov dword [esp + 0x30], eax
xor eax, eax
lea edx, [esp + 0x20]
push edx
mov edx, dword [edi]
mov dword [esp + 0x119], eax
mov dword [esp + 0x11d], eax
mov dword [esp + 0x121], eax
mov dword [esp + 0x125], eax
mov dword [esp + 0x129], eax
mov dword [esp + 0x12d], eax
mov dword [esp + 0x131], eax
mov dword [esp + 0x135], eax
lea eax, [esp + 0x20]
push eax
push 0x21
lea ecx, [esp + 0x120]
push ecx
push edx
mov byte [esp + 0x128], bl
mov dword [esp + 0x30], ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x417df4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
cmp esi, 0x3e5
je 0x417d92
push 0xe
push str.Read_cmd_fail_
lea ecx, [edi + 0x60]
call fcn.004059e0
cmp esi, ebx
je 0x417df4
lea eax, [esp + 0xdc]
push esi
push eax
call fcn.004019c0
sub esp, 0x14
mov dword [esp + 0x164], ebx
mov ecx, esp
mov dword [esp + 0x34], esp
push eax
mov eax, str.error_code_
call fcn.0040e560
sub esp, 0x18
mov ecx, esp
mov dword [esp + 0x4c], esp
mov byte [esp + 0x180], 1
push 9
mov dword [ecx + 0x14], 0xf
mov dword [ecx + 0x10], ebx
push str.read_data
mov byte [ecx], bl
call fcn.004059e0
mov ecx, 0x4bc400
mov byte [esp + 0x180], bl
call fcn.00402560
cmp dword [esp + 0xf0], 0x10
jb 0x417d8b
mov ecx, dword [esp + 0xdc]
push ecx
call fcn.00421a4e
add esp, 4
mov eax, esi
jmp 0x417e5e
mov eax, dword [esp + 0x30]
push 0x3e8
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, ebx
je 0x417df4
cmp eax, 0x102
je 0x417dd2
push 0x17
push str.Read_cmd_unknown_error_
lea ecx, [edi + 0x60]
call fcn.004059e0
mov ecx, dword [edi]
push ecx
call dword [sym.imp.KERNEL32.dll_CancelIo]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
jmp 0x417d06
mov edx, dword [edi]
push edx
call dword [sym.imp.KERNEL32.dll_CancelIo]
push 0x11
push str.Read_cmd_timeout_
lea ecx, [edi + 0x60]
mov esi, 0x5b4
call fcn.004059e0
jmp 0x417d0e
cmp byte [esp + 0x114], 0x54
je 0x417e14
push 0x17
push str.Read_data_format_error_
lea ecx, [edi + 0x60]
call fcn.004059e0
mov eax, 0xfffffffc
jmp 0x417e5e
cmp byte [ebp + 0x10], bl
je 0x417e84
mov dl, byte [esp + 0x115]
cmp dl, byte [ebp + 8]
je 0x417e3b
push 0x14
push str.Read_data_cmd_error_
lea ecx, [edi + 0x60]
call fcn.004059e0
mov eax, 0xfffffffb
jmp 0x417e5e
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x14]
push 0x1f
lea ecx, [esp + 0x11a]
push ecx
push edx
mov dword [eax], 0x1f
call fcn.00428770
add esp, 0xc
xor eax, eax
mov ecx, dword [esp + 0x140]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x128]
xor ecx, esp
call fcn.0042097b
mov esp, ebp
pop ebp
ret 0xc
cmp byte [esp + 0x115], 0xe4
je 0x417ea4
push 0x23
push str.Set_terminal_status_read_cmd_error_
lea ecx, [edi + 0x60]
call fcn.004059e0
mov eax, 0xfffffff9
jmp 0x417e5e
cmp byte [esp + 0x116], 8
je 0x417e5c
lea eax, [esp + 0x34]
push eax
call fcn.00403c60
mov dword [esp + 0x148], 2
movzx ecx, byte [esp + 0x116]
push ecx
push ecx
lea edx, [esp + 0x4c]
push str.Terminal_return__err:
push edx
call fcn.00407240
add esp, 0xc
push eax
call fcn.00403490
lea esi, [esp + 0xf8]
lea eax, [esp + 0x34]
call fcn.00403d00
lea esi, [edi + 0x60]
mov edi, eax
mov byte [esp + 0x148], 3
call fcn.004044e0
lea ecx, [esp + 0xf8]
call fcn.00403230
lea ecx, [esp + 0x34]
mov dword [esp + 0x148], 0xffffffff
call fcn.00401ab0
mov eax, 0xfffffffa
jmp 0x417e5e