Function at 0x100019c0
Capabilities:
Create thread

Disassembly:
sub esp, 0x20
push ebx
push esi
push edi
mov edi, dword [esp + 0x38]
xor ebx, ebx
cmp edi, ebx
mov byte [0x1000dce0], bl
jne 0x100019f8
mov edi, str.COM1
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, 0x1000dce4
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
jmp 0x10001a13
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, 0x1000dce4
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push ebx
push 0x40000000
push 3
push ebx
and ecx, 3
push ebx
push 0xc0000000
push 0x1000dce4
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [0x1000dcdc], eax
jne 0x10001a45
pop edi
pop esi
xor al, al
pop ebx
add esp, 0x20
ret
push 0x200
push 0x200
push eax
call dword [sym.imp.KERNEL32.dll_SetupComm]
mov ecx, dword [0x1000dcdc]
lea eax, [esp + 0x10]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetCommState]
mov ecx, dword [esp + 0x18]
mov eax, dword [0x1000dcdc]
lea edx, [esp + 0x38]
and ecx, 0xfffffffd
push edx
push eax
mov dword [esp + 0x1c], 0x2580
mov dword [esp + 0x20], ecx
mov byte [esp + 0x2a], 8
mov byte [esp + 0x2c], bl
mov dword [esp + 0x40], ebx
call dword [sym.imp.KERNEL32.dll_GetCommMask]
mov ecx, dword [0x1000dcdc]
push 0x85
push ecx
call dword [sym.imp.KERNEL32.dll_SetCommMask]
mov eax, dword [0x1000dcdc]
lea edx, [esp + 0x10]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_SetCommState]
mov ecx, dword [0x1000dcdc]
push 0xf
push ecx
call dword [sym.imp.KERNEL32.dll_PurgeComm]
push ebx
push 1
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateSemaphoreA]
test eax, eax
jne 0x10001ae3
pop edi
pop esi
xor al, al
pop ebx
add esp, 0x20
ret
mov eax, dword [esp + 0x30]
push 0x1000dcb0
push eax
mov dword [0x1000dcd4], eax
call fcn.100017c0
mov edx, dword [0x1000dcd4]
push 0x1000dc98
push edx
call fcn.100017c0
mov esi, dword [sym.imp.KERNEL32.dll_CreateEventA]
add esp, 0x10
mov dword [0x1000dc08], ebx
mov dword [0x1000dc0c], ebx
push str.ovRead
push ebx
push 1
push ebx
call esi
cmp eax, ebx
mov dword [0x1000dc10], eax
jne 0x10001b3a
pop edi
pop esi
xor al, al
pop ebx
add esp, 0x20
ret
push str.ovWrite
push ebx
push 1
push ebx
mov dword [0x1000dbf0], ebx
mov dword [0x1000dbf4], ebx
call esi
cmp eax, ebx
mov dword [0x1000dbf8], eax
jne 0x10001b63
pop edi
pop esi
xor al, al
pop ebx
add esp, 0x20
ret
mov ecx, 0x20
xor eax, eax
mov edi, 0x1000dc14
mov edx, 0x1000dc15
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x34]
stosb byte es:[edi], al
mov al, byte [ecx]
inc ecx
cmp al, bl
mov byte [0x1000dc14], al
je 0x10001b91
mov al, byte [ecx]
mov byte [edx], al
inc edx
inc ecx
cmp al, bl
jne 0x10001b87
lea eax, [esp + 0xc]
mov byte [0x1000dce0], 1
push eax
push ebx
push ebx
push 0x10001f50
push ebx
push ebx
mov dword [0x1000dccc], ebx
call dword [sym.imp.KERNEL32.dll_CreateThread]
cmp eax, ebx
mov dword [0x1000dccc], eax
jne 0x10001bc4
pop edi
pop esi
xor al, al
pop ebx
add esp, 0x20
ret
push str.CommWatchThreadExit
push 1
push 1
push ebx
call esi
cmp eax, ebx
pop edi
mov dword [0x1000dcc8], eax
pop esi
setne al
pop ebx
add esp, 0x20
ret