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

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x64
mov esi, ecx
mov edi, dword [esp + 0x7c]
movzx ecx, byte [esp + 0x80]
mov word [esp + 0x1c], 0
mov dword [esp + 0x18], 0
movzx ebx, word [edi + 0x10]
mov eax, ebx
and eax, 0x7fff
mov word [esp + 0x16], ax
test cl, cl
je 0x40bae5
movzx eax, ax
or eax, 0x80
mov word [esp + 0x16], ax
mov edx, dword [edi + 0xc]
mov dword [esp + 0x20], str.ACCELERATORS_entry_ID
mov word [esp + 0x30], 0x103
lea ebp, [esp + 0x20]
mov dword [esp + 4], ebp
mov dword [esp], 0x10
mov ecx, esi
call fcn.0040b910
cmp dword [esi], 0
jne 0x40bd07
mov eax, dword [edi + 0xc]
mov word [esp + 0x1a], ax
mov ecx, ebx
and ecx, 0x8001
cmp ecx, 0x8001
jne 0x40bb6d
mov dword [esp + 0x34], str.Accelerator_ID
mov dword [esp + 0x3c], eax
mov word [esp + 0x44], 0x903
lea eax, [esp + 0x34]
mov dword [esp + 0x48], eax
mov dword [esp + 0x50], 0x41f651
mov word [esp + 0x58], 0x302
lea eax, [esp + 0x48]
mov dword [esp + 0x20], eax
mov dword [esp + 0x28], str.Accelerator_cant_be_both_ASCII_and_VIRTKEY
jmp 0x40bcc4
test bl, 1
jne 0x40bbb7
test byte [edi + 0x10], 0x1c
je 0x40bbb7
mov dword [esp + 0x34], str.Accelerator_ID
mov dword [esp + 0x3c], eax
mov word [esp + 0x44], 0x903
lea eax, [esp + 0x34]
mov dword [esp + 0x48], eax
mov dword [esp + 0x50], 0x41f651
mov word [esp + 0x58], 0x302
lea eax, [esp + 0x48]
mov dword [esp + 0x20], eax
mov dword [esp + 0x28], str.Can_only_apply_ALT__SHIFT_or_CONTROL_to_VIRTKEY_accelerators
jmp 0x40bcc4
cmp byte [edi + 8], 0
je 0x40bc24
test cx, cx
je 0x40bc8a
mov ebx, dword [edi]
mov dword [esp + 0x20], str.Numeric_event_key_ID
mov word [esp + 0x30], 0x103
mov dword [esp + 4], ebp
mov dword [esp], 0x10
mov ecx, esi
mov edx, ebx
call fcn.0040b910
cmp dword [esi], 0
jne 0x40bd07
mov word [esp + 0x18], bx
mov edi, dword [esp + 0x78]
mov ecx, dword [edi + 0x70]
mov eax, dword [ecx]
call dword [eax + 0x28]
mov ecx, dword [edi + 0x70]
lea eax, [esp + 0x16]
mov dword [esp], eax
mov dword [esp + 4], 8
call fcn.0041c9b6
sub esp, 8
jmp 0x40bdc3
movsd xmm0, qword [edi]
movsd qword [esp + 0x5c], xmm0
lea ecx, [esp + 0x5c]
lea edx, [esp + 0x1f]
call fcn.00408550
mov ecx, dword [esp + 0x60]
lea eax, [ecx - 3]
cmp eax, 0xfffffffd
ja 0x40bd13
mov eax, dword [edi + 0xc]
mov dword [esp + 0x34], str.Accelerator_ID
mov dword [esp + 0x3c], eax
mov word [esp + 0x44], 0x903
lea eax, [esp + 0x34]
mov dword [esp + 0x48], eax
mov dword [esp + 0x50], 0x41f651
mov word [esp + 0x58], 0x302
lea eax, [esp + 0x48]
mov dword [esp + 0x20], eax
mov dword [esp + 0x28], str.Accelerator_string_events_should_have_length_1_or_2
jmp 0x40bcc4
mov dword [esp + 0x34], str.Accelerator_ID
mov dword [esp + 0x3c], eax
mov word [esp + 0x44], 0x903
lea eax, [esp + 0x34]
mov dword [esp + 0x48], eax
mov dword [esp + 0x50], 0x41f651
mov word [esp + 0x58], 0x302
lea eax, [esp + 0x48]
mov dword [esp + 0x20], eax
mov dword [esp + 0x28], str.Accelerator_with_a_numeric_event_must_be_either_ASCII_or_VIRTKEY
mov word [esp + 0x30], 0x302
call fcn.0041cbd2
mov edi, eax
mov dword [esp], 0x1c
call sub.libc.dll_operator_new_unsigned_int_
mov ebx, eax
mov dword [esp + 0x10], edi
mov dword [esp + 0xc], 0x16
movsd xmm0, qword [esp + 0xc]
movsd qword [esp + 4], xmm0
mov dword [esp], ebp
mov ecx, eax
call fcn.0041c9a4
sub esp, 0xc
mov dword [esi], ebx
mov eax, esi
add esp, 0x64
pop esi
pop edi
pop ebx
pop ebp
ret 0xc
mov edx, dword [esp + 0x5c]
movzx eax, byte [edx]
cmp eax, 0x5e
jne 0x40bd33
cmp ecx, 1
jne 0x40bd47
mov edx, dword [edi + 0xc]
mov dword [esp], str.No_character_following__in_accelerator_event
jmp 0x40bdf0
cmp ecx, 2
jne 0x40bd7b
mov edx, dword [edi + 0xc]
mov dword [esp], str.Event_string_should_be_one_character__possibly_preceded_by_
jmp 0x40bdf0
test bl, 1
jne 0x40bd86
movzx eax, byte [edx + 1]
mov edx, eax
add dl, 0x9f
mov cx, 0xffa0
cmp dl, 0x1a
jb 0x40bd6c
mov edx, eax
add dl, 0xbf
mov cx, 0xffc0
cmp dl, 0x1a
jae 0x40bde6
movzx eax, ax
movsx ecx, cx
add ecx, eax
mov word [esp + 0x18], cx
jmp 0x40bdb6
test bl, 1
jne 0x40bd92
test al, al
jns 0x40bdae
jmp 0x40bdce
mov edx, dword [edi + 0xc]
mov dword [esp], str.VIRTKEY_accelerator_events_cant_be_preceded_by_
jmp 0x40bdf0
mov dword [esp], eax
mov ebx, eax
call dword [sym.imp.msvcrt.dll_isalnum]
test eax, eax
je 0x40bdda
test bl, bl
js 0x40bdce
mov dword [esp], ebx
call dword [sym.imp.msvcrt.dll_toupper]
movzx eax, al
mov word [esp + 0x18], ax
lea edx, [esp + 0x16]
mov ecx, dword [esp + 0x78]
call fcn.0040beb0
mov dword [esi], 0
jmp 0x40bd07
mov edx, dword [edi + 0xc]
mov dword [esp], str.Non_ASCII_description_of_accelerator
jmp 0x40bdf0
mov edx, dword [edi + 0xc]
mov dword [esp], str.Non_alphanumeric_characters_cannot_describe_virtual_keys
jmp 0x40bdf0
mov edx, dword [edi + 0xc]
mov dword [esp], str.Control_character_accelerator_event_should_be_alphabetic
mov ecx, esi
call fcn.0040be00
jmp 0x40bd07