Function at 0x40d880
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x41cab1
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x5c
mov al, byte [esp + 3]
push ebx
push ebp
push esi
mov esi, ecx
push edi
push 0
lea ecx, [esp + 0x50]
mov dword [esp + 0x1c], esi
mov byte [esp + 0x50], al
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
mov cl, byte [esp + 0x13]
push 0
mov byte [esp + 0x40], cl
lea ecx, [esp + 0x40]
mov dword [esp + 0x78], 0
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
mov dl, byte [esp + 0x13]
mov ebx, 1
push 0
lea ecx, [esp + 0x30]
mov byte [esp + 0x78], bl
mov byte [esp + 0x30], dl
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
lea ecx, [esp + 0x24]
mov byte [esp + 0x74], 2
call dword [sym.imp.bcsfc.dll_public:_void___thiscall_BCSReg::constructor_void_]
mov byte [esp + 0x74], 3
call sub.MFC42.DLL_AfxGetModuleState
mov edi, dword [eax + 4]
mov eax, dword [esi + 0x288]
test eax, eax
mov dword [esp + 0x14], edi
jne 0x40d96f
lea ecx, [esp + 0x24]
mov byte [esp + 0x74], 2
call dword [sym.imp.bcsfc.dll_public:_void___thiscall_BCSReg::destructor_void_]
push ebx
lea ecx, [esp + 0x30]
mov byte [esp + 0x78], bl
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
push ebx
lea ecx, [esp + 0x40]
mov byte [esp + 0x78], 0
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
push ebx
lea ecx, [esp + 0x50]
mov dword [esp + 0x78], 0xffffffff
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
xor eax, eax
mov ecx, dword [esp + 0x6c]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x68
ret
add esi, 0x22c
push str.ScHardware
lea eax, [esp + 0x60]
push esi
push eax
call fcn.0040f690
lea ecx, [esp + 0x38]
push eax
push ecx
mov byte [esp + 0x88], 4
call fcn.0040fb60
add esp, 0x14
lea ecx, [esp + 0x5c]
mov byte [esp + 0x74], 3
push ebx
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
mov ebx, dword [sym.imp.bcsfc.dll_public:_int___thiscall_BCSReg::SetValue_struct_HKEY_____class__SS_char___class__SS_char___unsigned_long_int_]
xor esi, esi
add edi, 0x578
push esi
lea edx, [esp + 0x50]
push str.Channel_dComPort
push edx
call fcn.00406cd0
mov eax, dword [edi]
add esp, 0xc
push eax
lea eax, [esp + 0x50]
sub esp, 0x10
mov ecx, esp
mov dword [esp + 0x30], esp
push eax
call fcn.0040f230
sub esp, 0x10
lea edx, [esp + 0x50]
mov ecx, esp
mov dword [esp + 0x44], esp
push edx
mov byte [esp + 0x9c], 5
call fcn.0040f230
push 0x80000002
lea ecx, [esp + 0x4c]
mov byte [esp + 0x9c], 3
call ebx
mov ebp, eax
test ebp, ebp
je 0x40da23
inc esi
add edi, 4
cmp esi, 4
jb 0x40d9b9
xor edi, edi
jmp 0x40da6f
mov eax, dword [esp + 0x14]
lea ecx, [esp + 0x3c]
mov eax, dword [eax + esi*4 + 0x578]
push eax
push esi
push str.Unable_to_set_registry_variable_Channel_dComPort_to__d._COM_ports_can_not_be_assigned.
push ecx
call fcn.00406cd0
mov ecx, dword [esp + 0x28]
mov esi, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
xor edi, edi
add esp, 0x10
mov eax, dword [ecx + 0x270]
cmp eax, edi
jne 0x40da5a
mov eax, esi
mov edx, dword [esp + 0x40]
cmp edx, edi
jne 0x40da64
mov edx, esi
push 0x30
push eax
push edx
call sub.MFC42.DLL_CWnd::MessageBoxA
xor ebp, ebp
lea ecx, [esp + 0x24]
mov byte [esp + 0x74], 2
call dword [sym.imp.bcsfc.dll_public:_void___thiscall_BCSReg::destructor_void_]
mov ecx, dword [esp + 0x30]
cmp ecx, edi
je 0x40daa2
mov al, byte [ecx - 1]
test al, al
je 0x40da98
cmp al, 0xff
je 0x40da98
dec al
mov byte [ecx - 1], al
jmp 0x40daa2
dec ecx
push ecx
call sub.MFC42.DLL_operatordelete
add esp, 4
mov ecx, dword [esp + 0x40]
mov dword [esp + 0x30], edi
cmp ecx, edi
mov dword [esp + 0x34], edi
mov dword [esp + 0x38], edi
je 0x40dad2
mov al, byte [ecx - 1]
test al, al
je 0x40dac8
cmp al, 0xff
je 0x40dac8
dec al
mov byte [ecx - 1], al
jmp 0x40dad2
dec ecx
push ecx
call sub.MFC42.DLL_operatordelete
add esp, 4
mov ecx, dword [esp + 0x50]
mov dword [esp + 0x40], edi
cmp ecx, edi
mov dword [esp + 0x44], edi
mov dword [esp + 0x48], edi
je 0x40db02
mov al, byte [ecx - 1]
test al, al
je 0x40daf8
cmp al, 0xff
je 0x40daf8
dec al
mov byte [ecx - 1], al
jmp 0x40db02
dec ecx
push ecx
call sub.MFC42.DLL_operatordelete
add esp, 4
mov ecx, dword [esp + 0x6c]
pop edi
mov eax, ebp
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x68
ret