Function at 0x4090a0
Capabilities:
Create thread
Resume thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x527e50
mov eax, dword fs:[0]
push eax
sub esp, 0x420
mov eax, dword [0x573790]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov edi, dword [ebp + 0xc]
mov esi, dword [ebp + 8]
lea eax, [esi - 1]
cmp eax, 0xfe
ja 0x409338
mov ecx, dword [0x574ad4]
xor ebx, ebx
cmp ecx, ebx
je 0x4090fa
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push 1
call eax
push 0x18
call fcn.0040c49a
add esp, 4
cmp eax, ebx
je 0x40911d
mov dword [eax], vtable.CSerialPort.0
mov dword [eax + 4], 0xffffffff
mov dword [eax + 8], ebx
mov dword [eax + 0xc], ebx
jmp 0x40911f
xor eax, eax
cmp edi, ebx
setne cl
movzx edx, cl
mov dword [0x574ad4], eax
mov eax, dword [ebp + 0x10]
push edx
push eax
mov byte [0x574b08], cl
mov dword [ebp - 4], ebx
mov ecx, dword [0x574ad4]
push esi
mov byte [0x574b10], bl
mov dword [0x574aec], edi
call fcn.00409fd0
mov ecx, dword [ebp + 0x10]
push edi
push ecx
push esi
lea edx, [ebp - 0x414]
push 0x554a58
push edx
call fcn.004ff6e3
mov eax, dword [0x574ad0]
add esp, 0x14
cmp eax, ebx
je 0x409181
lea ecx, [ebp - 0x414]
push ecx
call eax
add esp, 4
mov dword [ebp - 4], 0xffffffff
mov eax, dword [0x574ad4]
mov ecx, dword [eax + 4]
lea edx, [ebp - 0x428]
push edx
push ecx
call dword [sym.imp.KERNEL32.dll_GetCommTimeouts]
test eax, eax
jne 0x4091a7
call fcn.00409e20
mov eax, dword [0x574ad4]
lea edx, [ebp - 0x428]
mov dword [ebp - 0x428], 0x64
mov ecx, dword [eax + 4]
push edx
push ecx
call dword [sym.imp.KERNEL32.dll_SetCommTimeouts]
test eax, eax
jne 0x4091d0
call fcn.00409e20
mov edx, dword [0x574ad4]
mov eax, dword [edx + 4]
push 0xf
push eax
call dword [sym.imp.KERNEL32.dll_PurgeComm]
test eax, eax
jne 0x4091eb
call fcn.00409e20
mov ecx, dword [0x574ad4]
mov edx, dword [ecx + 4]
push 0x1000
push 0x1000
push edx
call dword [sym.imp.KERNEL32.dll_SetupComm]
test eax, eax
jne 0x40920e
call fcn.00409e20
mov eax, dword [0x574ad0]
mov dword [0x574ae0], esi
cmp eax, ebx
je 0x409227
push 0x554aa8
call eax
add esp, 4
mov edi, dword [sym.imp.KERNEL32.dll_CreateEventA]
push ebx
push ebx
push 1
push ebx
call edi
mov dword [0x574b0c], eax
cmp eax, ebx
je 0x409338
mov eax, dword [0x574ad0]
cmp eax, ebx
je 0x409254
push 0x554ab8
call eax
add esp, 4
push 0x848
call fcn.0040c49a
add esp, 4
cmp eax, ebx
je 0x40926e
mov esi, eax
call fcn.00409580
jmp 0x409270
xor eax, eax
mov esi, eax
mov dword [0x574ad8], eax
call fcn.00409dc0
mov eax, dword [0x574ad8]
lea ecx, [eax + 4]
push ecx
push 4
push eax
push 0x409cb0
push ebx
push ebx
mov esi, eax
call dword [sym.imp.KERNEL32.dll_CreateThread]
push 2
push eax
mov dword [esi + 0xc], eax
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
mov edx, dword [0x574ad8]
mov eax, dword [edx + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_ResumeThread]
cmp byte [0x574b08], bl
je 0x4092d4
push ebx
push ebx
push 1
push ebx
call edi
mov dword [0x574af0], eax
cmp dword [0x574b0c], ebx
je 0x409338
mov dword [0x574b04], eax
mov eax, dword [0x574ad0]
mov byte [0x574b10], 1
cmp eax, ebx
je 0x4092ee
push 0x554ac4
call eax
add esp, 4
mov al, 1
jmp 0x40933a
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.004fecc6
mov esp, ebp
pop ebp
ret 0xc