Function at 0x40bf70
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 0x40bfb5
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.0040bde0
cmp dword [esi], 0
jne 0x40c1d7
mov eax, dword [edi + 0xc]
mov word [esp + 0x1a], ax
mov ecx, ebx
and ecx, 0x8001
cmp ecx, 0x8001
jne 0x40c03d
mov dword [esp + 0x34], str.Accelerator_ID
mov dword [esp + 0x3c], eax
mov word [esp + 0x44], 0x803
lea eax, [esp + 0x34]
mov dword [esp + 0x48], eax
mov dword [esp + 0x50], 0x41e48d
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 0x40c194
test bl, 1
jne 0x40c087
test byte [edi + 0x10], 0x1c
je 0x40c087
mov dword [esp + 0x34], str.Accelerator_ID
mov dword [esp + 0x3c], eax
mov word [esp + 0x44], 0x803
lea eax, [esp + 0x34]
mov dword [esp + 0x48], eax
mov dword [esp + 0x50], 0x41e48d
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 0x40c194
cmp byte [edi + 8], 0
je 0x40c0f4
test cx, cx
je 0x40c15a
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.0040bde0
cmp dword [esi], 0
jne 0x40c1d7
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.0041bbe0
sub esp, 8
jmp 0x40c293
movsd xmm0, qword [edi]
movsd qword [esp + 0x5c], xmm0
lea ecx, [esp + 0x5c]
lea edx, [esp + 0x1f]
call fcn.00408ae0
mov ecx, dword [esp + 0x60]
lea eax, [ecx - 3]
cmp eax, 0xfffffffd
ja 0x40c1e3
mov eax, dword [edi + 0xc]
mov dword [esp + 0x34], str.Accelerator_ID
mov dword [esp + 0x3c], eax
mov word [esp + 0x44], 0x803
lea eax, [esp + 0x34]
mov dword [esp + 0x48], eax
mov dword [esp + 0x50], 0x41e48d
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 0x40c194
mov dword [esp + 0x34], str.Accelerator_ID
mov dword [esp + 0x3c], eax
mov word [esp + 0x44], 0x803
lea eax, [esp + 0x34]
mov dword [esp + 0x48], eax
mov dword [esp + 0x50], 0x41e48d
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.0041bdf0
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.0041bbd4
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 0x40c203
cmp ecx, 1
jne 0x40c217
mov edx, dword [edi + 0xc]
mov dword [esp], str.No_character_following__in_accelerator_event
jmp 0x40c2c0
cmp ecx, 2
jne 0x40c24b
mov edx, dword [edi + 0xc]
mov dword [esp], str.Event_string_should_be_one_character__possibly_preceded_by_
jmp 0x40c2c0
test bl, 1
jne 0x40c256
movzx eax, byte [edx + 1]
mov edx, eax
add dl, 0x9f
mov cx, 0xffa0
cmp dl, 0x1a
jb 0x40c23c
mov edx, eax
add dl, 0xbf
mov cx, 0xffc0
cmp dl, 0x1a
jae 0x40c2b6
movzx eax, ax
movsx ecx, cx
add ecx, eax
mov word [esp + 0x18], cx
jmp 0x40c286
test bl, 1
jne 0x40c262
test al, al
jns 0x40c27e
jmp 0x40c29e
mov edx, dword [edi + 0xc]
mov dword [esp], str.VIRTKEY_accelerator_events_cant_be_preceded_by_
jmp 0x40c2c0
mov dword [esp], eax
mov ebx, eax
call dword [sym.imp.msvcrt.dll_isalnum]
test eax, eax
je 0x40c2aa
test bl, bl
js 0x40c29e
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.0040c380
mov dword [esi], 0
jmp 0x40c1d7
mov edx, dword [edi + 0xc]
mov dword [esp], str.Non_ASCII_description_of_accelerator
jmp 0x40c2c0
mov edx, dword [edi + 0xc]
mov dword [esp], str.Non_alphanumeric_characters_cannot_describe_virtual_keys
jmp 0x40c2c0
mov edx, dword [edi + 0xc]
mov dword [esp], str.Control_character_accelerator_event_should_be_alphabetic
mov ecx, esi
call fcn.0040c2d0
jmp 0x40c1d7