Function at 0x100077b0
Capabilities:
Terminate thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1017dcf6
mov eax, dword fs:[0]
push eax
sub esp, 0x35c
mov eax, dword [0x101e4e54]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
xorps xmm0, xmm0
mov dword [ebp - 0x328], 0
movq qword [ebp - 0x330], xmm0
mov dword [ebp - 0x330], 0
mov dword [ebp - 0x32c], 0
mov dword [ebp - 0x328], 0
xor edx, edx
mov dword [ebp - 4], 0
movq qword [ebp - 0x324], xmm0
mov dword [ebp - 0x31c], 0
mov dword [ebp - 0x368], edx
mov dword [ebp - 0x324], edx
mov dword [ebp - 0x320], edx
mov dword [ebp - 0x31c], edx
mov byte [ebp - 4], 1
cmp byte [esi + 2], dl
je 0x10007da2
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
nop dword [eax]
cmp byte [esi + 3], 0
jne 0x10007be8
lea eax, [ebp - 0x324]
push eax
lea eax, [ebp - 0x330]
push eax
call fcn.10007ea0
mov edi, dword [ebp - 0x324]
mov eax, edi
mov dword [ebp - 0x368], edi
mov dword [ebp - 0x364], edi
cmp eax, dword [ebp - 0x320]
je 0x10007be8
nop dword [eax]
push dword [eax]
mov ebx, dword [esi + 0xc]
lea eax, [ebp - 0x318]
push str..COM_d
push eax
call fcn.100146f0
add esp, 0xc
lea eax, [ebp - 0x318]
push 0
push 0
push 3
push 0
push 0
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
jne 0x100078f1
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
call ebx
mov dword [esi + 0x10], 4
jmp 0x10007aee
push 0x2800
push 0x2800
push edi
call dword [sym.imp.KERNEL32.dll_SetupComm]
test eax, eax
je 0x10007ad6
lea eax, [ebp - 0x344]
mov dword [ebp - 0x344], 5
push eax
push edi
mov dword [ebp - 0x340], 5
mov dword [ebp - 0x33c], 5
mov dword [ebp - 0x338], 0x64
mov dword [ebp - 0x334], 0xc8
call dword [sym.imp.KERNEL32.dll_SetCommTimeouts]
test eax, eax
je 0x10007ad6
lea eax, [ebp - 0x360]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetCommState]
test eax, eax
je 0x10007ad6
mov eax, dword [ebp - 0x358]
and eax, 0xffff8ccf
mov dword [ebp - 0x35c], ebx
or eax, 1
mov word [ebp - 0x34e], 8
mov dword [ebp - 0x358], eax
lea eax, [ebp - 0x360]
push eax
push edi
mov byte [ebp - 0x34c], 0
call dword [sym.imp.KERNEL32.dll_SetCommState]
test eax, eax
je 0x10007ad6
push 6
push edi
call dword [sym.imp.KERNEL32.dll_EscapeCommFunction]
test eax, eax
je 0x10007ad6
mov ebx, dword [sym.imp.KERNEL32.dll_PurgeComm]
push 0xf
push edi
call ebx
test eax, eax
je 0x10007ad6
mov dword [esi + 0x10], edi
cmp edi, 4
je 0x10007ae8
mov ecx, esi
call fcn.10004970
push 0x12c
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0x200
lea eax, [ebp - 0x218]
mov dword [ebp - 0x18], 0x7f3f3
push 0
push eax
mov dword [ebp - 0x14], 0
call fcn.10155cd0
add esp, 0xc
lea eax, [ebp - 0x18]
push 0
push 0
push ecx
push eax
push dword [esi + 0x10]
call fcn.10014730
push 0x1f4
push 3
lea eax, [ebp - 0x18]
push eax
push ecx
lea eax, [ebp - 0x218]
push eax
push dword [esi + 0x10]
call fcn.10006010
test al, al
je 0x10007a8a
cmp byte [ebp - 0x20e], 0
jne 0x10007a8a
cmp byte [ebp - 0x20d], 0
jne 0x10007a8a
cmp byte [ebp - 0x20c], 0
jne 0x10007a8a
cmp byte [ebp - 0x20b], 0x72
jne 0x10007a8a
push str.The_detector_is_type_114_hardware.
push 0x16e
push str.CDetector::QueryAecType
push 1
push 0
push dword [0x101ee06c]
call fcn.1000cdf0
add esp, 0x18
mov eax, 2
jmp 0x10007a8f
mov eax, 1
mov ecx, esi
mov dword [esi + 0xd8], eax
call fcn.10003d10
test eax, eax
je 0x10007b0e
mov edi, dword [esi + 0x10]
cmp edi, 0xffffffff
je 0x10007ac3
push 0xf
push edi
call ebx
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call ebx
mov byte [esi + 3], 0
mov dword [esi + 0x10], 0
jmp 0x10007aee
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [esi + 3], 0
mov dword [esi + 0x10], 0
jmp 0x10007aee
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call ebx
mov dword [esi + 0x10], 4
jmp 0x10007aee
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x364]
add eax, 4
mov dword [ebp - 0x364], eax
cmp eax, dword [ebp - 0x320]
jne 0x100078a0
jmp 0x10007be8
mov eax, dword [ebp - 0x364]
lea edi, [esi + 8]
mov byte [esi + 3], 1
mov eax, dword [eax]
push eax
push str.COM_d
push edi
mov dword [esi + 4], eax
call fcn.1000a050
push dword [esi + 4]
mov byte [esi + 0x92], 0
push str.Successfully_initialized_detector__port_of_the_detector:_COM_d
push 0x7ab
push str.CDetector::DetectorDeviceThreadProc
push 0
push 0
push dword [0x101ee06c]
mov dword [esi + 0x94], 0
mov dword [esi + 0x98], 0
mov dword [esi + 0x9c], 0
call fcn.1000cdf0
mov eax, dword [edi]
sub eax, 0x10
push eax
call fcn.1000a660
add esp, 0x2c
lea edi, [eax + 0x10]
mov dword [ebp - 0x364], edi
lea eax, [ebp - 0x364]
mov byte [ebp - 4], 2
push eax
mov ecx, 0x101ee0c0
call fcn.1000a6c0
mov byte [0x101ee000], 0
add edi, 0xfffffff0
mov byte [ebp - 4], 1
or eax, 0xffffffff
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x10007bc1
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [0x101edff4]
test eax, eax
je 0x10007bd4
push dword [0x101edff0]
push 1
call eax
mov ecx, esi
call fcn.10004890
mov ecx, esi
call fcn.10005f20
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x12c
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp byte [esi + 3], 0
je 0x10007cf9
cmp byte [0x101ee000], 0
je 0x10007cf9
push str.Monitor_port_is_plug_out.
push 0x7d5
push str.CDetector::DetectorDeviceThreadProc
push 0
push 0
push dword [0x101ee06c]
call fcn.1000cdf0
mov edi, dword [esi + 0x10]
add esp, 0x18
cmp edi, 0xffffffff
je 0x10007c3f
push 0xf
push edi
call dword [sym.imp.KERNEL32.dll_PurgeComm]
push edi
call ebx
cmp dword [0x101edff4], 0
mov byte [esi + 3], 0
mov dword [esi + 0x10], 0
mov dword [esi + 0xd4], 0x63
mov dword [esi + 0xd8], 0x63
je 0x10007cf9
xor al, al
xchg byte [esi], al
push dword [0x101edff0]
push 2
call dword [0x101edff4]
cmp dword [esi + 0xa4], 0
je 0x10007cf9
push str.Terminating_device_detect_thread
push 0x7e6
push str.CDetector::DetectorDeviceThreadProc
push 4
push 0
push dword [0x101ee06c]
call fcn.1000cdf0
add esp, 0x18
push 0
push dword [esi + 0xa4]
call dword [sym.imp.KERNEL32.dll_TerminateThread]
push 0x1f4
push dword [esi + 0xa4]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push dword [esi + 0xa4]
call ebx
push str.Terminated_device_detect_thread
push 0x7ed
push str.CDetector::DetectorDeviceThreadProc
push 4
push 0
push dword [0x101ee06c]
mov dword [esi + 0xa4], 0
call fcn.1000cdf0
add esp, 0x18
cmp byte [esi + 2], 0
jne 0x10007860
mov edx, dword [ebp - 0x368]
test edx, edx
je 0x10007d40
mov ecx, dword [ebp - 0x31c]
mov eax, edx
sub ecx, edx
and ecx, 0xfffffffc
cmp ecx, 0x1000
jb 0x10007d36
mov edx, dword [edx - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10007dbe
push ecx
push edx
call fcn.1015158f
add esp, 8
mov ecx, dword [ebp - 0x330]
test ecx, ecx
je 0x10007da2
mov edx, dword [ebp - 0x32c]
push ecx
call fcn.10009150
mov ecx, dword [ebp - 0x328]
mov eax, 0x2aaaaaab
mov esi, dword [ebp - 0x330]
add esp, 4
sub ecx, esi
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
lea ecx, [eax + eax*2]
mov eax, esi
shl ecx, 3
cmp ecx, 0x1000
jb 0x10007d98
mov esi, dword [esi - 4]
add ecx, 0x23
sub eax, esi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10007dbe
push ecx
push esi
call fcn.1015158f
add esp, 8
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.1015155e
mov esp, ebp
pop ebp
ret
call fcn.1015862f
int3