Function at 0x100012e0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
mov eax, dword [0x100163f4]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
mov edi, ecx
mov esi, edx
mov dword [ebp - 0x14], esi
mov dword [ebp - 0x18], 0
test edi, edi
jne 0x10001317
pop edi
or eax, 0xffffffff
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10003a18
mov esp, ebp
pop ebp
ret
test esi, esi
jne 0x1000132e
pop edi
lea eax, [esi - 2]
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10003a18
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x28]
push eax
push dword [edi + 0xc]
call dword [sym.imp.KERNEL32.dll_ClearCommError]
test eax, eax
jne 0x10001358
pop edi
mov eax, 0xfffffffc
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10003a18
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x28]
mov ecx, eax
and ecx, 0x200
mov dword [ebp - 0x3c], ecx
mov ecx, eax
and ecx, 0x8000
mov dword [ebp - 0x30], ecx
mov ecx, eax
and ecx, 0x10
mov dword [ebp - 0x1c], ecx
mov ecx, eax
and ecx, 8
mov dword [ebp - 0x38], ecx
mov ecx, eax
and ecx, 1
mov dword [ebp - 0x20], ecx
mov ecx, eax
and ecx, 0x100
mov dword [ebp - 0x24], ecx
mov ecx, eax
and ecx, 2
push ebx
mov dword [ebp - 0x2c], ecx
mov ebx, eax
mov ecx, eax
and ecx, 4
and ebx, 0x1000
mov dword [ebp - 0x34], ecx
test eax, 0x400
je 0x100013ca
push str._nfIOE_n
call fcn.10003b8b
add eax, 0x40
push eax
call fcn.10003e53
add esp, 8
test ebx, ebx
je 0x100013e4
push str._nfOOP_n
call fcn.10003b8b
add eax, 0x40
push eax
call fcn.10003e53
add esp, 8
cmp dword [ebp - 0x3c], 0
je 0x10001400
push str._nfPTO_n
call fcn.10003b8b
add eax, 0x40
push eax
call fcn.10003e53
add esp, 8
cmp dword [ebp - 0x30], 0
je 0x1000141c
push str._nfMODE_n
call fcn.10003b8b
add eax, 0x40
push eax
call fcn.10003e53
add esp, 8
cmp dword [ebp - 0x1c], 0
je 0x10001438
push str._nfBREAK_n
call fcn.10003b8b
add eax, 0x40
push eax
call fcn.10003e53
add esp, 8
cmp dword [ebp - 0x38], 0
je 0x10001454
push str._nfFRAME_n
call fcn.10003b8b
add eax, 0x40
push eax
call fcn.10003e53
add esp, 8
cmp dword [ebp - 0x20], 0
je 0x10001470
push str._nfRXOVER_n
call fcn.10003b8b
add eax, 0x40
push eax
call fcn.10003e53
add esp, 8
cmp dword [ebp - 0x24], 0
je 0x1000148c
push str._nfTXFULL_n
call fcn.10003b8b
add eax, 0x40
push eax
call fcn.10003e53
add esp, 8
cmp dword [ebp - 0x2c], 0
je 0x100014a8
push str._nfOVERRUN_n
call fcn.10003b8b
add eax, 0x40
push eax
call fcn.10003e53
add esp, 8
cmp dword [ebp - 0x34], 0
je 0x100014c4
push str._nfRXPARITY_n
call fcn.10003b8b
add eax, 0x40
push eax
call fcn.10003e53
add esp, 8
mov eax, dword [ebp - 0x10]
test al, 1
je 0x100014e4
push str._nfCtsHold_n
call fcn.10003b8b
add eax, 0x40
push eax
call fcn.10003e53
mov eax, dword [ebp - 0x10]
add esp, 8
test al, 2
je 0x10001501
push str._nfDsrHold_n
call fcn.10003b8b
add eax, 0x40
push eax
call fcn.10003e53
mov eax, dword [ebp - 0x10]
add esp, 8
test al, 4
je 0x1000151e
push str._nfRlsdHold_n
call fcn.10003b8b
add eax, 0x40
push eax
call fcn.10003e53
mov eax, dword [ebp - 0x10]
add esp, 8
test al, 8
je 0x1000153b
push str._nfXoffHold_n
call fcn.10003b8b
add eax, 0x40
push eax
call fcn.10003e53
mov eax, dword [ebp - 0x10]
add esp, 8
test al, 0x10
je 0x10001558
push str._nfXoffSent_n
call fcn.10003b8b
add eax, 0x40
push eax
call fcn.10003e53
mov eax, dword [ebp - 0x10]
add esp, 8
test al, 0x20
je 0x10001575
push str._nfEof_n
call fcn.10003b8b
add eax, 0x40
push eax
call fcn.10003e53
mov eax, dword [ebp - 0x10]
add esp, 8
test al, 0x40
je 0x1000158f
push str._nfTxim_n
call fcn.10003b8b
add eax, 0x40
push eax
call fcn.10003e53
add esp, 8
cmp dword [ebp - 8], 0
je 0x100015ab
push str._ncbOutQue_n
call fcn.10003b8b
add eax, 0x40
push eax
call fcn.10003e53
add esp, 8
call fcn.10003b8b
add eax, 0x40
push eax
call fcn.10003d1a
add esp, 4
lea eax, [ebp - 0x18]
push 0
push eax
push 1
push esi
push dword [edi + 0xc]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x100015e8
pop ebx
pop edi
mov eax, 0xfffffffd
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10003a18
mov esp, ebp
pop ebp
ret
mov ebx, dword [ebp - 0x18]
mov eax, esi
mov byte [eax + 1], 0
cmp dword [edi], 0
je 0x10001632
test ebx, ebx
je 0x10001632
xor esi, esi
test ebx, ebx
jle 0x1000161c
movzx eax, byte [eax + esi]
push eax
push str.__02X
push dword [edi]
call fcn.10003e53
mov eax, dword [ebp - 0x14]
inc esi
add esp, 0xc
cmp esi, ebx
jl 0x10001600
push 0x10014bb0
push dword [edi]
call fcn.10003e53
push dword [edi]
call fcn.10003d1a
add esp, 0xc
mov ecx, dword [ebp - 4]
mov eax, ebx
pop ebx
pop edi
xor ecx, ebp
pop esi
call fcn.10003a18
mov esp, ebp
pop ebp
ret