Function at 0x401528
Capabilities:
Resolve function by parsing pe exports
Resume thread
Terminate thread

Disassembly:
mov eax, 0x4245db
call sub.MSVCRT.dll__EH_prolog
push ecx
push ebx
push esi
mov esi, ecx
push edi
mov dword [ebp - 0x10], esi
mov dword [esi], section..rdata
xor eax, eax
mov dword [ebp - 4], 0x14
cmp dword [esi + 0x310], eax
je 0x40171e
cmp dword [esi + 0x330], eax
je 0x40156d
mov ecx, dword [0x42fd2c]
mov ecx, dword [ecx + 4]
mov dword [ecx + 0x94], eax
mov eax, dword [esi + 0xe8]
mov edi, dword [sym.imp.KERNEL32.dll_ResumeThread]
push 1
pop ebx
mov dword [esi + 0x318], ebx
push dword [eax + 0x2c]
call edi
mov eax, dword [esi + 0xec]
push dword [eax + 0x2c]
call edi
mov eax, dword [esi + 0xf0]
push dword [eax + 0x2c]
call edi
push dword [esi + 0x108]
mov dword [esi + 0x2f8], ebx
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov eax, dword [esi + 0xf0]
mov edi, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push 0x2710
push dword [eax + 0x2c]
call edi
mov ebx, 0x102
cmp eax, ebx
jne 0x4015df
mov eax, dword [esi + 0xf0]
push 0
push dword [eax + 0x2c]
call dword [sym.imp.KERNEL32.dll_TerminateThread]
mov eax, dword [esi + 0xec]
push 0x2710
push dword [eax + 0x2c]
call edi
cmp eax, ebx
jne 0x401604
mov eax, dword [esi + 0xec]
push 0
push dword [eax + 0x2c]
call dword [sym.imp.KERNEL32.dll_TerminateThread]
mov eax, dword [esi + 0xe8]
push 0x2710
push dword [eax + 0x2c]
call edi
cmp eax, ebx
jne 0x40162c
mov eax, dword [esi + 0xe8]
xor ebx, ebx
push ebx
push dword [eax + 0x2c]
call dword [sym.imp.KERNEL32.dll_TerminateThread]
jmp 0x40162e
xor ebx, ebx
lea edi, [esi + 0x348]
cmp dword [edi], ebx
je 0x401642
push ebx
mov ecx, esi
call fcn.00404db1
jmp 0x401634
push dword [esi + 0xf4]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call edi
push dword [esi + 0xf8]
call edi
push dword [esi + 0xfc]
call edi
push dword [esi + 0x100]
call edi
push dword [esi + 0x104]
call edi
push dword [esi + 0x108]
call edi
mov edi, dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
lea eax, [esi + 0x10c]
push eax
call edi
lea eax, [esi + 0x124]
push eax
call edi
lea eax, [esi + 0x13c]
push eax
call edi
lea eax, [esi + 0x154]
push eax
call edi
lea eax, [esi + 0x16c]
push eax
call edi
lea eax, [esi + 0x184]
push eax
call edi
cmp dword [esi + 0x314], 1
jne 0x4016c8
mov ecx, dword [esi + 0x308]
call sub.Serial.dll_public:_void___thiscall_CSerial::Close_void_
mov edi, dword [esi + 0x300]
mov dword [esi + 0x308], ebx
cmp edi, ebx
je 0x4016e6
mov ecx, edi
call sub.Serial.dll_public:_void___thiscall_CSerial::destructor_void_
push edi
call sub.MFC42.DLL_operatordelete
pop ecx
mov edi, dword [esi + 0x304]
cmp edi, ebx
je 0x4016fe
mov ecx, edi
call sub.Serial.dll_public:_void___thiscall_CSerial::destructor_void_
push edi
call sub.MFC42.DLL_operatordelete
pop ecx
cmp dword [esi + 0x330], ebx
je 0x40171e
mov eax, dword [0x42fd2c]
mov ecx, dword [eax + 4]
cmp dword [ecx + 0x98], 0
je 0x40171e
push 0
call fcn.0040fcfd
lea ecx, [esi + 0x368]
mov byte [ebp - 4], 0x13
call sub.MFC42.DLL_CString::CString
lea ecx, [esi + 0x33c]
mov byte [ebp - 4], 0x12
call sub.MFC42.DLL_CObList::CObList
lea ecx, [esi + 0xcc]
mov byte [ebp - 4], 0x11
call sub.MFC42.DLL_CObList::CObList
lea ecx, [esi + 0xb0]
mov byte [ebp - 4], 0x10
call sub.MFC42.DLL_CObList::CObList
lea ecx, [esi + 0x94]
mov byte [ebp - 4], 0xf
call sub.MFC42.DLL_CObList::CObList
lea ecx, [esi + 0x78]
mov byte [ebp - 4], 0xe
call sub.MFC42.DLL_CObList::CObList
lea ecx, [esi + 0x44]
mov byte [ebp - 4], 0xd
call sub.MFC42.DLL_CString::CString
lea ecx, [esi + 0x40]
mov byte [ebp - 4], 0xc
call sub.MFC42.DLL_CString::CString
lea ecx, [esi + 0x3c]
mov byte [ebp - 4], 0xb
call sub.MFC42.DLL_CString::CString
lea ecx, [esi + 0x38]
mov byte [ebp - 4], 0xa
call sub.MFC42.DLL_CString::CString
lea ecx, [esi + 0x34]
mov byte [ebp - 4], 9
call sub.MFC42.DLL_CString::CString
lea ecx, [esi + 0x24]
mov byte [ebp - 4], 8
call sub.MFC42.DLL_CString::CString
lea ecx, [esi + 0x20]
mov byte [ebp - 4], 7
call sub.MFC42.DLL_CString::CString
lea ecx, [esi + 0x1c]
mov byte [ebp - 4], 6
call sub.MFC42.DLL_CString::CString
lea ecx, [esi + 0x18]
mov byte [ebp - 4], 5
call sub.MFC42.DLL_CString::CString
lea ecx, [esi + 0x14]
mov byte [ebp - 4], 4
call sub.MFC42.DLL_CString::CString
lea ecx, [esi + 0x10]
mov byte [ebp - 4], 3
call sub.MFC42.DLL_CString::CString
lea ecx, [esi + 0xc]
mov byte [ebp - 4], 2
call sub.MFC42.DLL_CString::CString
lea ecx, [esi + 8]
mov byte [ebp - 4], 1
call sub.MFC42.DLL_CString::CString
and byte [ebp - 4], 0
lea ecx, [esi + 4]
call sub.MFC42.DLL_CString::CString
mov ecx, dword [ebp - 0xc]
mov dword [esi], 0x427018
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret