Function at 0x100319f0
Capabilities:
Create thread

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1006265d
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x78
mov eax, dword [0x10079040]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov al, byte [esi + 0x58]
test al, al
jne 0x10032098
push 4
xorps xmm0, xmm0
mov dword [ebp - 0x58], 0
push str.._
lea ecx, [ebp - 0x68]
mov dword [ebp - 0x54], 0
movups xmmword [ebp - 0x68], xmm0
call fcn.10006da0
lea eax, [esi + 0x5c]
mov dword [ebp - 4], 0
push eax
lea ecx, [ebp - 0x68]
call fcn.100133f0
cmp dword [ebp - 0x54], 0xf
lea eax, [ebp - 0x68]
push 0
cmova eax, dword [ebp - 0x68]
push 0x40000080
push 3
push 0
push 0
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [esi + 0x20], eax
cmp eax, 0xffffffff
je 0x1003205a
mov edi, dword [sym.imp.KERNEL32.dll_CreateEventA]
push 0
push 0
push 1
push 0
call edi
mov dword [esi + 0x28], eax
cmp eax, 0xffffffff
je 0x1003204a
push 0
push 0
xorps xmm0, xmm0
push 1
movups xmmword [esi + 0x44], xmm0
push 0
mov dword [esi + 0x54], 0
call edi
mov dword [esi + 0x54], eax
cmp eax, 0xffffffff
je 0x1003204a
cmp dword [esi + 0x84], 0
mov dword [ebp - 0x18], 0x1c200
mov byte [ebp - 0x86], 8
mov byte [ebp - 0x87], 0
mov byte [ebp - 0x85], 0
je 0x10031e93
cmp dword [0x1007b9d8], 0xf
lea ecx, [esi + 0x74]
mov eax, 0x1007b9c4
cmova eax, dword [0x1007b9c4]
cmp dword [esi + 0x88], 0xf
jbe 0x10031b2d
mov ecx, dword [esi + 0x74]
push dword [0x1007b9d4]
mov edx, dword [esi + 0x84]
push eax
call fcn.10014b10
add esp, 8
test eax, eax
je 0x10031e93
push 8
xorps xmm0, xmm0
mov dword [ebp - 0x20], 0
push str.baudrate
lea ecx, [ebp - 0x30]
mov dword [ebp - 0x1c], 0
movups xmmword [ebp - 0x30], xmm0
call fcn.10006da0
lea eax, [ebp - 0x30]
mov byte [ebp - 4], 1
push eax
lea edx, [esi + 0x74]
lea ecx, [ebp - 0x4c]
call fcn.1002ba10
add esp, 4
cmp dword [eax + 0x14], 0xf
jbe 0x10031b8c
mov eax, dword [eax]
push 0xa
push 0
push eax
call fcn.10048463
mov ecx, dword [ebp - 0x38]
add esp, 0xc
mov dword [ebp - 0x18], eax
cmp ecx, 0xf
jbe 0x10031bd0
mov edx, dword [ebp - 0x4c]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x10031bc6
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x100320b6
push ecx
push edx
call fcn.100337ea
add esp, 8
mov byte [ebp - 4], 0
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x38], 0xf
mov byte [ebp - 0x4c], 0
cmp ecx, 0xf
jbe 0x10031c1a
mov edx, dword [ebp - 0x30]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x10031c10
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x100320b6
push ecx
push edx
call fcn.100337ea
add esp, 8
push 8
xorps xmm0, xmm0
mov dword [ebp - 0x20], 0
push str.databits
lea ecx, [ebp - 0x30]
mov dword [ebp - 0x1c], 0
movups xmmword [ebp - 0x30], xmm0
call fcn.10006da0
lea eax, [ebp - 0x30]
mov byte [ebp - 4], 2
push eax
lea edx, [esi + 0x74]
lea ecx, [ebp - 0x4c]
call fcn.1002ba10
add esp, 4
cmp dword [eax + 0x14], 0xf
jbe 0x10031c5c
mov eax, dword [eax]
push 0xa
push 0
push eax
call fcn.10048463
mov ecx, dword [ebp - 0x38]
add esp, 0xc
mov byte [ebp - 0x86], al
cmp ecx, 0xf
jbe 0x10031ca3
mov edx, dword [ebp - 0x4c]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x10031c99
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x100320bb
push ecx
push edx
call fcn.100337ea
add esp, 8
mov byte [ebp - 4], 0
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x38], 0xf
mov byte [ebp - 0x4c], 0
cmp ecx, 0xf
jbe 0x10031ced
mov edx, dword [ebp - 0x30]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x10031ce3
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x100320bb
push ecx
push edx
call fcn.100337ea
add esp, 8
push 8
xorps xmm0, xmm0
mov dword [ebp - 0x20], 0
push str.stopbits
lea ecx, [ebp - 0x30]
mov dword [ebp - 0x1c], 0
movups xmmword [ebp - 0x30], xmm0
call fcn.10006da0
lea eax, [ebp - 0x30]
mov byte [ebp - 4], 3
push eax
lea edx, [esi + 0x74]
lea ecx, [ebp - 0x4c]
call fcn.1002ba10
add esp, 4
cmp dword [eax + 0x14], 0xf
jbe 0x10031d2f
mov eax, dword [eax]
push 0xa
push 0
push eax
call fcn.10048463
mov ecx, dword [ebp - 0x38]
add esp, 0xc
mov byte [ebp - 0x87], al
cmp ecx, 0xf
jbe 0x10031d76
mov edx, dword [ebp - 0x4c]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x10031d6c
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x100320c0
push ecx
push edx
call fcn.100337ea
add esp, 8
mov byte [ebp - 4], 0
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x38], 0xf
mov byte [ebp - 0x4c], 0
cmp ecx, 0xf
jbe 0x10031dc0
mov edx, dword [ebp - 0x30]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x10031db6
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x100320c0
push ecx
push edx
call fcn.100337ea
add esp, 8
push 6
xorps xmm0, xmm0
mov dword [ebp - 0x20], 0
push str.parity
lea ecx, [ebp - 0x30]
mov dword [ebp - 0x1c], 0
movups xmmword [ebp - 0x30], xmm0
call fcn.10006da0
lea eax, [ebp - 0x30]
mov byte [ebp - 4], 4
push eax
lea edx, [esi + 0x74]
lea ecx, [ebp - 0x4c]
call fcn.1002ba10
add esp, 4
cmp dword [eax + 0x14], 0xf
jbe 0x10031e02
mov eax, dword [eax]
push 0xa
push 0
push eax
call fcn.10048463
mov ecx, dword [ebp - 0x38]
add esp, 0xc
mov byte [ebp - 0x85], al
cmp ecx, 0xf
jbe 0x10031e49
mov edx, dword [ebp - 0x4c]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x10031e3f
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x100320c5
push ecx
push edx
call fcn.100337ea
add esp, 8
mov byte [ebp - 4], 0
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x38], 0xf
mov byte [ebp - 0x4c], 0
cmp ecx, 0xf
jbe 0x10031e93
mov edx, dword [ebp - 0x30]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x10031e89
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x100320c5
push ecx
push edx
call fcn.100337ea
add esp, 8
lea eax, [ebp - 0x84]
mov dword [ebp - 0x34], 0x1c
push eax
push dword [esi + 0x20]
mov dword [esi + 0x2c], 0
mov dword [ebp - 0x84], 0x1c
call dword [sym.imp.KERNEL32.dll_GetCommState]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x10031edd
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x80], eax
lea eax, [ebp - 0x84]
push eax
push dword [esi + 0x20]
call dword [sym.imp.KERNEL32.dll_SetCommState]
jmp 0x10031edf
call edi
lea eax, [ebp - 0x50]
mov dword [esi + 0x2c], 0
push eax
push dword [esi + 0x20]
mov dword [ebp - 0x50], 0x1c
call dword [sym.imp.KERNEL32.dll_GetCommState]
test eax, eax
je 0x10031f2c
mov al, byte [ebp - 0x85]
and dword [ebp - 0x48], 0xfffffffd
mov byte [ebp - 0x3d], al
mov al, byte [ebp - 0x86]
mov byte [ebp - 0x3e], al
mov al, byte [ebp - 0x87]
mov byte [ebp - 0x3c], al
lea eax, [ebp - 0x50]
push eax
push dword [esi + 0x20]
call dword [sym.imp.KERNEL32.dll_SetCommState]
jmp 0x10031f31
call edi
mov dword [esi + 0x2c], eax
lea eax, [ebp - 0x34]
push eax
push dword [esi + 0x20]
call dword [sym.imp.KERNEL32.dll_GetCommState]
test eax, eax
je 0x10031f5e
and dword [ebp - 0x2c], 0xffff8e83
lea eax, [ebp - 0x34]
push eax
push dword [esi + 0x20]
call dword [sym.imp.KERNEL32.dll_SetCommState]
test eax, eax
je 0x1003204a
lea eax, [ebp - 0x2c]
mov dword [esi + 0x2c], 0
push eax
push dword [esi + 0x20]
call dword [sym.imp.KERNEL32.dll_GetCommTimeouts]
test eax, eax
je 0x10032045
lea eax, [ebp - 0x2c]
mov dword [ebp - 0x2c], 0x32
push eax
push dword [esi + 0x20]
mov dword [ebp - 0x28], 0x32
mov dword [ebp - 0x24], 0xa
call dword [sym.imp.KERNEL32.dll_SetCommTimeouts]
test eax, eax
je 0x1003204a
lea eax, [ebp - 0x2c]
mov dword [esi + 0x2c], 0
push eax
push dword [esi + 0x20]
call dword [sym.imp.KERNEL32.dll_GetCommTimeouts]
test eax, eax
je 0x10032045
lea eax, [ebp - 0x2c]
mov dword [ebp - 0x20], 0x32
push eax
push dword [esi + 0x20]
mov dword [ebp - 0x1c], 0xa
call dword [sym.imp.KERNEL32.dll_SetCommTimeouts]
test eax, eax
je 0x1003204a
push 1
push dword [esi + 0x20]
call dword [sym.imp.KERNEL32.dll_SetCommMask]
push 0xd
push dword [esi + 0x20]
call dword [sym.imp.KERNEL32.dll_PurgeComm]
cmp dword [esi + 0x24], 0
je 0x10032009
mov al, 1
mov dword [esi + 0x2c], 0xb7
mov byte [esi + 0x58], al
jmp 0x1003205c
lea eax, [ebp - 0x18]
mov dword [esi + 0x2c], 0
push eax
push 0x20
push esi
push 0x100320d0
push 0
push 0
mov dword [ebp - 0x18], 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [esi + 0x24], eax
test eax, eax
jne 0x10032039
call edi
mov dword [esi + 0x2c], eax
cmp dword [esi + 0x24], 0
setne al
mov byte [esi + 0x58], al
jmp 0x1003205c
call edi
mov dword [esi + 0x2c], eax
push dword [esi + 0x20]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 0x20], 0xffffffff
xor al, al
mov ecx, dword [ebp - 0x54]
mov byte [ebp - 0x85], al
cmp ecx, 0xf
jbe 0x10032098
mov edx, dword [ebp - 0x68]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x10032088
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x100320ca
push ecx
push edx
call fcn.100337ea
mov al, byte [ebp - 0x85]
add esp, 8
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.10033290
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
call fcn.1004280a
call fcn.1004280a
call fcn.1004280a
call fcn.1004280a
call fcn.1004280a
int3