Function at 0x1002c200
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
mov eax, dword [0x1006d258]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
cmp dword [eax], 0
je 0x1002c222
mov eax, 0xfffffb21
jmp 0x1002c512
xor ecx, ecx
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x10], ecx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], ecx
cmp dword [ebp + 0xc], 0xa
jge 0x1002c24f
mov edx, dword [ebp + 0xc]
push edx
push 0x10061c84
push 0x10
lea eax, [ebp - 0x14]
push eax
call fcn.10048177
add esp, 0x10
jmp 0x1002c266
mov ecx, dword [ebp + 0xc]
push ecx
push str..COM_d
push 0x10
lea edx, [ebp - 0x14]
push edx
call fcn.10048177
add esp, 0x10
push 0
push 0x40000080
push 3
push 0
push 0
push 0xc0000000
lea eax, [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0xffffffff
jne 0x1002c29c
mov dword [ebp - 0x18], 0
call fcn.100110d0
jmp 0x1002c512
push 1
mov ecx, dword [ebp - 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll_SetCommMask]
test eax, eax
jne 0x1002c2c7
mov edx, dword [ebp - 0x18]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x18], 0
call fcn.100110d0
jmp 0x1002c512
push 0x1000
push 0x1000
mov eax, dword [ebp - 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_SetupComm]
test eax, eax
jne 0x1002c2fa
mov ecx, dword [ebp - 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x18], 0
call fcn.100110d0
jmp 0x1002c512
push 0xf
mov edx, dword [ebp - 0x18]
push edx
call dword [sym.imp.KERNEL32.dll_PurgeComm]
test eax, eax
jne 0x1002c325
mov eax, dword [ebp - 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x18], 0
call fcn.100110d0
jmp 0x1002c512
xor ecx, ecx
mov dword [ebp - 0x48], ecx
mov dword [ebp - 0x44], ecx
mov dword [ebp - 0x40], ecx
mov dword [ebp - 0x3c], ecx
mov dword [ebp - 0x38], ecx
mov dword [ebp - 0x48], 0x1e
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x40], 0xc8
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x38], 0
lea edx, [ebp - 0x48]
push edx
mov eax, dword [ebp - 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_SetCommTimeouts]
test eax, eax
jne 0x1002c386
mov ecx, dword [ebp - 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x18], 0
call fcn.100110d0
jmp 0x1002c512
lea edx, [ebp - 0x34]
push edx
mov eax, dword [ebp - 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_GetCommState]
test eax, eax
jne 0x1002c3b3
mov ecx, dword [ebp - 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x18], 0
call fcn.100110d0
jmp 0x1002c512
mov dword [ebp - 0x34], 0x1c
mov edx, dword [ebp + 0x10]
mov dword [ebp - 0x30], edx
mov eax, dword [ebp - 0x2c]
or eax, 1
mov dword [ebp - 0x2c], eax
mov ecx, dword [ebp - 0x2c]
and ecx, 0xfffffffd
mov dword [ebp - 0x2c], ecx
mov edx, dword [ebp - 0x2c]
and edx, 0xfffffffb
mov dword [ebp - 0x2c], edx
mov eax, dword [ebp - 0x2c]
and eax, 0xfffffff7
mov dword [ebp - 0x2c], eax
mov ecx, dword [ebp - 0x2c]
and ecx, 0xffffffcf
or ecx, 0x10
mov dword [ebp - 0x2c], ecx
mov edx, dword [ebp - 0x2c]
and edx, 0xffffffbf
mov dword [ebp - 0x2c], edx
mov eax, dword [ebp - 0x2c]
and eax, 0xffffff7f
mov dword [ebp - 0x2c], eax
mov ecx, dword [ebp - 0x2c]
and ecx, 0xfffffeff
mov dword [ebp - 0x2c], ecx
mov edx, dword [ebp - 0x2c]
and edx, 0xfffffbff
mov dword [ebp - 0x2c], edx
mov eax, dword [ebp - 0x2c]
and eax, 0xfffff7ff
mov dword [ebp - 0x2c], eax
mov ecx, dword [ebp - 0x2c]
and ecx, 0xffffcfff
or ecx, 0x1000
mov dword [ebp - 0x2c], ecx
mov edx, dword [ebp - 0x2c]
and edx, 0xffffbfff
mov dword [ebp - 0x2c], edx
mov eax, dword [ebp - 0x2c]
and eax, 0x7fff
mov dword [ebp - 0x2c], eax
xor ecx, ecx
mov word [ebp - 0x28], cx
mov edx, 0x800
mov word [ebp - 0x26], dx
mov eax, 0x200
mov word [ebp - 0x24], ax
mov byte [ebp - 0x22], 8
mov byte [ebp - 0x21], 0
mov byte [ebp - 0x20], 0
mov byte [ebp - 0x1f], 0x11
mov byte [ebp - 0x1e], 0x13
mov byte [ebp - 0x1d], 0
mov byte [ebp - 0x1c], 0
mov byte [ebp - 0x1b], 0
lea ecx, [ebp - 0x34]
push ecx
mov edx, dword [ebp - 0x18]
push edx
call dword [sym.imp.KERNEL32.dll_SetCommState]
test eax, eax
jne 0x1002c4b2
mov eax, dword [ebp - 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x18], 0
call fcn.100110d0
jmp 0x1002c512
cmp dword [ebp + 0x14], 0
jne 0x1002c508
push 0
push 0
push 0
mov ecx, dword [ebp + 0x18]
push ecx
push 0
push 0
call fcn.1004ac90
add esp, 0x18
mov dword [ebp - 0x4c], eax
cmp dword [ebp - 0x4c], 0
je 0x1002c4dd
cmp dword [ebp - 0x4c], 0xffffffff
jne 0x1002c4fe
mov edx, dword [ebp - 0x18]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x18], 0
call fcn.10049745
mov eax, dword [eax]
not eax
add eax, 1
jmp 0x1002c512
mov eax, dword [ebp - 0x4c]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 0x18]
mov dword [ecx], edx
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10048168
mov esp, ebp
pop ebp
ret 0x14