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

Disassembly:
push 0xffffffffffffffff
push 0x41c7c1
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x134
mov al, byte [esp + 3]
push ebx
push ebp
push esi
mov dword [esp + 0x7c], ecx
xor ebx, ebx
push edi
push ebx
lea ecx, [esp + 0x88]
mov byte [esp + 0x88], 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_]
lea ecx, [esp + 0x28]
mov dword [esp + 0x14c], ebx
call dword [sym.imp.bcsfc.dll_public:_void___thiscall_BCSReg::constructor_void_]
lea ecx, [esp + 0x84]
push str.SYSTEMCurrentControlSetServicesWrtComEnum
push ecx
mov byte [esp + 0x154], 1
mov dword [esp + 0x20], ebx
call fcn.00406f40
add esp, 8
lea edx, [esp + 0x18]
push edx
sub esp, 0x10
mov ecx, esp
mov dword [esp + 0x38], esp
push str.Count
call fcn.0040ee90
sub esp, 0x10
lea eax, [esp + 0xa8]
mov ecx, esp
mov dword [esp + 0x38], esp
push eax
mov byte [esp + 0x174], 2
call fcn.0040f230
push 0x80000002
lea ecx, [esp + 0x50]
mov byte [esp + 0x174], 1
call dword [sym.imp.bcsfc.dll_public:_int___thiscall_BCSReg::GetValue_struct_HKEY_____class__SS_char___class__SS_char___unsigned_long_int__]
cmp eax, ebx
jne 0x40b0c5
mov dword [esp + 0x18], ebx
mov eax, dword [esp + 0x18]
xor edi, edi
cmp eax, ebx
mov dword [esp + 0x24], edi
jbe 0x40b62d
mov ebp, dword [sym.imp.bcsfc.dll_public:_int___thiscall_BCSReg::GetValue_struct_HKEY_____class__SS_char___class__SS_char___class__SS_char___]
mov cl, byte [esp + 0x13]
push ebx
mov byte [esp + 0x74], cl
lea ecx, [esp + 0x74]
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]
push ebx
lea ecx, [esp + 0x44]
mov byte [esp + 0x150], 3
mov dword [esp + 0x18], ebx
mov byte [esp + 0x44], 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_]
push edi
lea eax, [esp + 0x74]
push 0x4248e4
push eax
mov byte [esp + 0x158], 4
xor esi, esi
mov dword [esp + 0x20], ebx
call fcn.00406cd0
add esp, 0xc
lea ecx, [esp + 0x40]
lea edx, [esp + 0x70]
push ecx
sub esp, 0x10
mov ecx, esp
mov dword [esp + 0x34], esp
push edx
call fcn.0040f230
sub esp, 0x10
lea eax, [esp + 0xa8]
mov ecx, esp
mov dword [esp + 0x40], esp
push eax
mov byte [esp + 0x174], 5
call fcn.0040f230
push 0x80000002
lea ecx, [esp + 0x50]
mov byte [esp + 0x174], 4
call ebp
cmp eax, ebx
je 0x40b5b2
mov cl, byte [esp + 0x13]
push ebx
mov byte [esp + 0x54], cl
lea ecx, [esp + 0x54]
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]
push ebx
lea ecx, [esp + 0x64]
mov byte [esp + 0x150], 6
mov byte [esp + 0x64], 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_]
mov eax, dword [esp + 0x44]
mov byte [esp + 0x14c], 7
cmp eax, ebx
jne 0x40b1c4
mov eax, 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]
mov edi, dword [sym.imp.MSVCRT.dll_sscanf]
lea ecx, [esp + 0xc4]
push ecx
push str.ACPIPNP0501_s
push eax
call edi
add esp, 0xc
test eax, eax
jle 0x40b344
mov dl, byte [esp + 0x13]
push ebx
lea ecx, [esp + 0x98]
mov byte [esp + 0x98], 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 eax, [esp + 0x40]
lea ecx, [esp + 0xa4]
push eax
push str.SYSTEMCurrentControlSetenum_
push ecx
mov byte [esp + 0x158], 8
call fcn.0040f4e0
lea edx, [esp + 0xa0]
push eax
push edx
mov byte [esp + 0x160], 9
call fcn.0040fb60
add esp, 0x14
lea ecx, [esp + 0xa4]
mov byte [esp + 0x14c], 8
push 1
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 eax, [esp + 0x50]
push eax
sub esp, 0x10
mov ecx, esp
mov dword [esp + 0x30], esp
push str.FriendlyName
call fcn.0040ee90
sub esp, 0x10
lea edx, [esp + 0xb8]
mov ecx, esp
mov dword [esp + 0x44], esp
push edx
mov byte [esp + 0x174], 0xa
call fcn.0040f230
push 0x80000002
lea ecx, [esp + 0x50]
mov byte [esp + 0x174], 8
call ebp
cmp eax, ebx
je 0x40b32d
mov eax, dword [esp + 0x54]
cmp eax, ebx
jne 0x40b2ab
mov eax, 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]
lea ecx, [esp + 0x14]
push ecx
push str.Communications_Port__COM_d_
push eax
call edi
add esp, 0xc
lea edx, [esp + 0x60]
push edx
sub esp, 0x10
mov ecx, esp
mov dword [esp + 0x30], esp
push str.Service
call fcn.0040ee90
sub esp, 0x10
lea eax, [esp + 0xb8]
mov ecx, esp
mov dword [esp + 0x44], esp
push eax
mov byte [esp + 0x174], 0xb
call fcn.0040f230
push 0x80000002
lea ecx, [esp + 0x50]
mov byte [esp + 0x174], 8
call ebp
cmp eax, ebx
je 0x40b32d
mov eax, dword [esp + 0x64]
cmp eax, ebx
jne 0x40b315
mov eax, 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]
push str.WrtCom
push eax
call dword [sym.imp.MSVCRT.dll__mbscmp]
mov esi, eax
add esp, 8
neg esi
sbb esi, esi
add esi, 2
push 1
lea ecx, [esp + 0x98]
mov byte [esp + 0x150], 7
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 eax, dword [esp + 0x44]
cmp eax, ebx
jne 0x40b351
mov eax, 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]
lea ecx, [esp + 0xc4]
push ecx
push str.RootPNP0501_s
push eax
call edi
add esp, 0xc
test eax, eax
jle 0x40b531
mov dl, byte [esp + 0x13]
push ebx
lea ecx, [esp + 0x34]
mov byte [esp + 0x34], 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 eax, [esp + 0x40]
lea ecx, [esp + 0xb4]
push eax
push str.SYSTEMCurrentControlSetEnum_
push ecx
mov byte [esp + 0x158], 0xc
call fcn.0040f4e0
add esp, 0xc
mov edi, eax
mov eax, dword [esp + 0x34]
mov edx, 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]
cmp eax, ebx
mov byte [esp + 0x14c], 0xd
jne 0x40b3bb
mov eax, edx
mov ecx, dword [edi + 4]
cmp ecx, ebx
jne 0x40b3c4
mov ecx, edx
cmp eax, ecx
je 0x40b403
mov edx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
lea ecx, [esp + 0x30]
mov eax, dword [edx]
push eax
push ebx
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::erase_unsigned_int__unsigned_int_]
mov edi, dword [edi + 4]
mov edx, 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]
cmp edi, ebx
je 0x40b3eb
mov edx, edi
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push edx
lea ecx, [esp + 0x38]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::assign_char_const___unsigned_int_]
push 1
lea ecx, [esp + 0xb8]
mov byte [esp + 0x150], 0xc
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 + 0x50]
push ecx
sub esp, 0x10
mov ecx, esp
mov dword [esp + 0x30], esp
push str.FriendlyName
call fcn.0040ee90
sub esp, 0x10
lea edx, [esp + 0x54]
mov ecx, esp
mov dword [esp + 0x44], esp
push edx
mov byte [esp + 0x174], 0xe
call fcn.0040f230
push 0x80000002
lea ecx, [esp + 0x50]
mov byte [esp + 0x174], 0xc
call ebp
cmp eax, ebx
je 0x40b4f8
mov eax, dword [esp + 0x54]
cmp eax, ebx
jne 0x40b475
mov eax, 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]
lea ecx, [esp + 0x14]
push ecx
push str.Communications_Port__COM_d_
push eax
call dword [sym.imp.MSVCRT.dll_sscanf]
add esp, 0xc
lea edx, [esp + 0x60]
push edx
sub esp, 0x10
mov ecx, esp
mov dword [esp + 0x30], esp
push str.Service
call fcn.0040ee90
sub esp, 0x10
lea eax, [esp + 0x54]
mov ecx, esp
mov dword [esp + 0x44], esp
push eax
mov byte [esp + 0x174], 0xf
call fcn.0040f230
push 0x80000002
lea ecx, [esp + 0x50]
mov byte [esp + 0x174], 0xc
call ebp
cmp eax, ebx
je 0x40b4f8
mov eax, dword [esp + 0x64]
cmp eax, ebx
jne 0x40b4e0
mov eax, 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]
push str.WrtCom
push eax
call dword [sym.imp.MSVCRT.dll__mbscmp]
mov esi, eax
add esp, 8
neg esi
sbb esi, esi
add esi, 2
mov eax, dword [esp + 0x34]
mov byte [esp + 0x14c], 7
cmp eax, ebx
je 0x40b525
lea ecx, [eax - 1]
mov al, byte [eax - 1]
cmp al, bl
je 0x40b51c
cmp al, 0xff
je 0x40b51c
dec al
mov byte [ecx], al
jmp 0x40b525
push ecx
call sub.MFC42.DLL_operatordelete
add esp, 4
mov dword [esp + 0x34], ebx
mov dword [esp + 0x38], ebx
mov dword [esp + 0x3c], ebx
mov eax, dword [esp + 0x14]
cmp eax, ebx
jle 0x40b54c
cmp eax, 0x64
jge 0x40b54c
mov ecx, dword [esp + 0x80]
push esi
push eax
call fcn.0040b680
mov eax, dword [esp + 0x64]
cmp eax, ebx
je 0x40b571
lea ecx, [eax - 1]
mov al, byte [eax - 1]
cmp al, bl
je 0x40b568
cmp al, 0xff
je 0x40b568
dec al
mov byte [ecx], al
jmp 0x40b571
push ecx
call sub.MFC42.DLL_operatordelete
add esp, 4
mov eax, dword [esp + 0x54]
mov dword [esp + 0x64], ebx
cmp eax, ebx
mov dword [esp + 0x68], ebx
mov dword [esp + 0x6c], ebx
je 0x40b5a2
lea ecx, [eax - 1]
mov al, byte [eax - 1]
cmp al, bl
je 0x40b599
cmp al, 0xff
je 0x40b599
dec al
mov byte [ecx], al
jmp 0x40b5a2
push ecx
call sub.MFC42.DLL_operatordelete
add esp, 4
mov edi, dword [esp + 0x24]
mov dword [esp + 0x54], ebx
mov dword [esp + 0x58], ebx
mov dword [esp + 0x5c], ebx
mov eax, dword [esp + 0x44]
cmp eax, ebx
je 0x40b5d7
lea ecx, [eax - 1]
mov al, byte [eax - 1]
cmp al, bl
je 0x40b5ce
cmp al, 0xff
je 0x40b5ce
dec al
mov byte [ecx], al
jmp 0x40b5d7
push ecx
call sub.MFC42.DLL_operatordelete
add esp, 4
mov eax, dword [esp + 0x74]
mov dword [esp + 0x44], ebx
cmp eax, ebx
mov dword [esp + 0x48], ebx
mov dword [esp + 0x4c], ebx
mov byte [esp + 0x14c], 1
je 0x40b610
lea ecx, [eax - 1]
mov al, byte [eax - 1]
cmp al, bl
je 0x40b607
cmp al, 0xff
je 0x40b607
dec al
mov byte [ecx], al
jmp 0x40b610
push ecx
call sub.MFC42.DLL_operatordelete
add esp, 4
mov eax, dword [esp + 0x18]
inc edi
cmp edi, eax
mov dword [esp + 0x74], ebx
mov dword [esp + 0x78], ebx
mov dword [esp + 0x7c], ebx
mov dword [esp + 0x24], edi
jb 0x40b0dd
lea ecx, [esp + 0x28]
mov byte [esp + 0x14c], bl
call dword [sym.imp.bcsfc.dll_public:_void___thiscall_BCSReg::destructor_void_]
mov ecx, dword [esp + 0x88]
cmp ecx, ebx
je 0x40b665
mov al, byte [ecx - 1]
cmp al, bl
je 0x40b65b
cmp al, 0xff
je 0x40b65b
dec al
mov byte [ecx - 1], al
jmp 0x40b665
dec ecx
push ecx
call sub.MFC42.DLL_operatordelete
add esp, 4
mov ecx, dword [esp + 0x144]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x140
ret