Function at 0x404d30
Capabilities:
Read file on windows

Disassembly:
mov eax, 0x1020
call fcn.00414880
mov eax, dword [0x42a930]
xor eax, esp
mov dword [esp + 0x101c], eax
mov edx, dword [0x42a0dc]
push ebx
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_ClearCommError]
push esi
push edi
lea eax, [esp + 0x1c]
push eax
xor ebx, ebx
lea ecx, [esp + 0x18]
mov dword [esp + 0x14], ebx
mov eax, dword [edx]
push ecx
push eax
call ebp
mov eax, dword [esp + 0x20]
cmp eax, 0xc80
mov esi, dword [sym.imp.KERNEL32.dll_EscapeCommFunction]
jb 0x404d9c
mov ecx, dword [0x42a0dc]
mov edx, dword [ecx]
push 4
push edx
call esi
push str._Read_COMX:____CLRRTS
call fcn.004113d0
mov eax, dword [esp + 0x24]
add esp, 4
cmp eax, 0xc8
jae 0x404dc0
mov eax, dword [0x42a0dc]
mov ecx, dword [eax]
push 3
push ecx
call esi
push str._Read_COMX:____SETRTS
call fcn.004113d0
mov eax, dword [esp + 0x24]
add esp, 4
cmp eax, 0x800
mov dword [esp + 0x10], eax
jbe 0x404dd3
mov dword [esp + 0x10], 0x800
mov edx, dword [0x437ab0]
push edx
push str._Read_COMX:___Pixmode_d
call fcn.004113d0
mov eax, dword [0x42a0dc]
add esp, 8
lea ecx, [eax + 0x890]
mov eax, dword [eax]
push ecx
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0x14]
push edx
push ecx
lea edx, [esp + 0x38]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x404e6e
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
cmp eax, 0x3e5
jne 0x404f48
push str._Read_COMX:____ERROR_IO_PENDING
call fcn.004113d0
mov esi, dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
add esp, 4
mov eax, dword [0x42a0dc]
push 1
lea ecx, [esp + 0x1c]
push ecx
lea edx, [eax + 0x890]
mov eax, dword [eax]
push edx
push eax
call esi
test eax, eax
jne 0x404e6e
call edi
cmp eax, 0x3e4
je 0x404e35
mov eax, dword [0x42a0dc]
lea ecx, [esp + 0x1c]
push ecx
mov ecx, dword [eax]
lea edx, [esp + 0x18]
push edx
push ecx
call ebp
mov eax, dword [esp + 0x10]
push eax
push str._Read_COMX:___xxxx_ReadFile_xxxx
call fcn.004113d0
mov ecx, dword [0x437ab0]
mov edx, dword [esp + 0x18]
push ecx
push edx
push str._Read_COMX:___length___d_:Pixmode_d
call fcn.004113d0
mov ecx, dword [esp + 0x24]
add esp, 0x14
cmp ecx, 0x80
jae 0x404ec0
cmp ecx, ebx
jbe 0x404f24
lea eax, [esp + 0x2c]
push eax
push str._Read_COMX:___data____s_
mov byte [esp + ecx + 0x34], bl
call fcn.004113d0
mov ecx, dword [esp + 0x18]
add esp, 8
cmp ecx, ebx
jbe 0x404f24
xor eax, eax
cmp ecx, ebx
mov dword [0x42bc98], ecx
jle 0x404f07
mov si, word [0x433ccc]
jmp 0x404ee0
movzx edx, si
mov dword [esp + 0x28], ebx
mov bl, byte [esp + eax + 0x2c]
add eax, 1
add si, 1
cmp eax, ecx
mov byte [edx + 0x435590], bl
mov ebx, dword [esp + 0x28]
jl 0x404ee0
mov word [0x433ccc], si
cmp dword [0x437ab0], ebx
jne 0x404f24
mov eax, dword [esp + 0x1034]
push eax
call fcn.004036f0
test eax, eax
je 0x404f6e
mov ecx, dword [esp + 0x10]
mov dword [0x42bc98], ecx
mov eax, 1
mov ecx, dword [esp + 0x102c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0041355c
add esp, 0x1020
ret
mov ecx, dword [0x42a0dc]
lea edx, [esp + 0x1c]
push edx
lea eax, [esp + 0x18]
mov dword [esp + 0x1c], ebx
mov edx, dword [ecx]
push eax
push edx
call ebp
push str._Read_COMX:____ClearCommError
call fcn.004113d0
add esp, 4
xor eax, eax
jmp 0x404f2f