Function at 0x46d27a
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4823d2
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
mov eax, 0x1074
call fcn.0047a910
mov dword [ebp - 0x1078], ecx
mov eax, dword [ebp - 0x1078]
mov byte [eax + 8], 0
mov ecx, dword [ebp - 0x1078]
mov byte [ecx + 0x10], 0
mov edx, dword [ebp - 0x1078]
mov byte [edx + 0x11], 0
mov eax, dword [ebp - 0x1078]
mov byte [eax + 0x12], 0
lea ecx, [ebp - 0x1044]
mov dword [ebp - 0x14], ecx
lea ecx, [ebp - 0x1050]
call sub.MFC42.DLL_CString::CString_2
mov dword [ebp - 4], 0
push 0x81
mov edx, dword [ebp - 0x1078]
mov eax, dword [edx + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_SetCommMask]
test eax, eax
jne 0x46d332
mov ecx, dword [ebp - 0x1078]
mov edx, dword [ecx + 0x1c]
push edx
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov byte [ebp - 0x106c], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x1050]
call sub.MFC42.DLL_CString::CString
mov al, byte [ebp - 0x106c]
jmp 0x46d6cd
push 0x14
push 0
lea eax, [ebp - 0x28]
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
push 0
push 1
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov dword [ebp - 0x18], eax
push 0x14
push 0
lea ecx, [ebp - 0x3c]
push ecx
call sub.MSVCRT.dll_memset
add esp, 0xc
push 0
push 0
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov dword [ebp - 0x2c], eax
mov edx, dword [ebp - 0x1078]
cmp dword [edx + 0x14], 0
je 0x46d392
push 0xf
mov eax, dword [ebp - 0x1078]
mov ecx, dword [eax + 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_PurgeComm]
mov edx, dword [ebp - 0x1078]
cmp dword [edx + 0x20], 0
jne 0x46d68a
mov dword [ebp - 0x1060], 0
mov dword [ebp - 0x1064], 0
lea eax, [ebp - 0x3c]
push eax
lea ecx, [ebp - 0x1060]
push ecx
mov edx, dword [ebp - 0x1078]
mov eax, dword [edx + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_WaitCommEvent]
test eax, eax
jne 0x46d40a
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
je 0x46d3ed
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x57
jne 0x46d40a
push 1
lea ecx, [ebp - 0x1064]
push ecx
lea edx, [ebp - 0x3c]
push edx
mov eax, dword [ebp - 0x1078]
mov ecx, dword [eax + 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
mov edx, dword [ebp - 0x1078]
cmp dword [edx + 0x20], 0
je 0x46d41b
jmp 0x46d68a
cmp dword [ebp - 0x1060], 1
je 0x46d4b0
mov eax, dword [ebp - 0x1060]
and eax, 0x80
test eax, eax
je 0x46d4b0
lea ecx, [ebp - 0x105c]
push ecx
lea edx, [ebp - 0x10]
push edx
mov eax, dword [ebp - 0x1078]
mov ecx, dword [eax + 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_ClearCommError]
push 0xf
mov edx, dword [ebp - 0x1078]
mov eax, dword [edx + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_PurgeComm]
mov ecx, dword [ebp - 0x1078]
xor edx, edx
mov dl, byte [ecx + 0x10]
test edx, edx
je 0x46d4ab
mov byte [ebp - 0x104c], 0x15
lea eax, [ebp - 0x104c]
push eax
push 1
mov ecx, dword [ebp - 0x1078]
call fcn.0046de96
and eax, 0xff
test eax, eax
jne 0x46d4ab
lea ecx, [ebp - 0x104c]
push ecx
push 1
mov ecx, dword [ebp - 0x1078]
call fcn.0046de96
jmp 0x46d392
mov dword [ebp - 0x1048], 0
mov edx, dword [ebp - 0x1048]
mov dword [ebp - 0x1064], edx
mov eax, dword [ebp - 0x1064]
mov dword [ebp - 0x40], eax
lea ecx, [ebp - 0x105c]
push ecx
lea edx, [ebp - 0x10]
push edx
mov eax, dword [ebp - 0x1078]
mov ecx, dword [eax + 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_ClearCommError]
mov edx, dword [ebp - 0x1058]
mov dword [ebp - 0x40], edx
cmp dword [ebp - 0x40], 0
jbe 0x46d685
mov dword [ebp - 0x1068], 0
jmp 0x46d518
mov eax, dword [ebp - 0x1068]
add eax, 1
mov dword [ebp - 0x1068], eax
cmp dword [ebp - 0x1068], 0x1001
jge 0x46d534
mov ecx, dword [ebp - 0x1068]
mov byte [ebp + ecx - 0x1044], 0
jmp 0x46d509
lea edx, [ebp - 0x28]
push edx
lea eax, [ebp - 0x1048]
push eax
mov ecx, dword [ebp - 0x40]
push ecx
lea edx, [ebp - 0x1044]
push edx
mov eax, dword [ebp - 0x1078]
mov ecx, dword [eax + 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x46d5b5
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
je 0x46d576
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x57
jne 0x46d5b3
push 0
lea edx, [ebp - 0x1064]
push edx
lea eax, [ebp - 0x28]
push eax
mov ecx, dword [ebp - 0x1078]
mov edx, dword [ecx + 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
cmp dword [ebp - 0x1064], 1
jb 0x46d5ac
mov eax, dword [ebp - 0x1064]
mov byte [ebp + eax - 0x1044], 0
jmp 0x46d5b3
mov byte [ebp - 0x1044], 0
jmp 0x46d5d5
cmp dword [ebp - 0x1048], 1
jb 0x46d5ce
mov ecx, dword [ebp - 0x1048]
mov byte [ebp + ecx - 0x1044], 0
jmp 0x46d5d5
mov byte [ebp - 0x1044], 0
mov edx, dword [ebp - 0x1078]
cmp dword [edx + 0x20], 0
je 0x46d5e6
jmp 0x46d68a
lea eax, [ebp - 0x1044]
mov dword [ebp - 0x14], eax
lea ecx, [ebp - 0x1050]
call sub.MFC42.DLL_CString::Empty
mov ecx, dword [ebp - 0x14]
push ecx
lea ecx, [ebp - 0x1050]
call sub.MFC42.DLL_CString::operator_1
lea ecx, [ebp - 0x1050]
call sub.MFC42.DLL_CString::Empty
mov edx, dword [ebp - 0x14]
push edx
lea ecx, [ebp - 0x1050]
call sub.MFC42.DLL_CString::operator_1
lea eax, [ebp - 0x1050]
push eax
mov ecx, dword [ebp - 0x1078]
add ecx, 4
push ecx
lea edx, [ebp - 0x1070]
push edx
call sub.MFC42.DLL_operator_1
mov dword [ebp - 0x107c], eax
mov eax, dword [ebp - 0x107c]
mov dword [ebp - 0x1080], eax
mov byte [ebp - 4], 1
mov ecx, dword [ebp - 0x1080]
push ecx
mov ecx, dword [ebp - 0x1078]
add ecx, 4
call fcn.00479efa
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x1070]
call sub.MFC42.DLL_CString::CString
mov ecx, dword [ebp - 0x1078]
call fcn.0046d6db
jmp 0x46d392
mov edx, dword [ebp - 0x2c]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x1078]
mov edx, dword [ecx + 0x1c]
push edx
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov byte [ebp - 0x1074], 1
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x1050]
call sub.MFC42.DLL_CString::CString
mov al, byte [ebp - 0x1074]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret