Function at 0x500690
Capabilities:
Get keyboard layout

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x64
mov byte [ebp - 1], 0x5c
mov eax, 0x7af
mov word [ebp - 0xc], ax
movzx ecx, byte [ebp - 1]
cmp ecx, 0x31
jne 0x5006e2
push 0xb8
push 0xfe
push 0xaa
call fcn.00501100
movsx edx, word [ebp - 0xc]
sub edx, 0x60c
mov word [ebp - 0xc], dx
movzx eax, word [ebp - 0xc]
push eax
push 0x48
movzx ecx, byte [ebp - 1]
push ecx
call fcn.004ff9b0
add esp, 0xc
movsx edx, word [ebp - 0xc]
mov dword [ebp - 0x28], edx
cmp dword [ebp - 0x28], 0x28f
je 0x5008e1
cmp dword [ebp - 0x28], 0x7af
je 0x500704
jmp 0x500912
mov byte [ebp - 2], 0x52
movsx eax, word [ebp - 0xc]
cmp eax, 0x2da
jl 0x500729
mov cx, word [ebp - 0xc]
mov word [ebp - 0x14], cx
lea edx, [ebp - 2]
mov dword [ebp - 0x38], edx
mov al, byte [ebp - 2]
mov byte [ebp - 3], al
jmp 0x50073b
push 0x2f
push 0x22
mov ecx, dword [ebp - 0x40]
push ecx
call dword [sym.imp.USER32.dll_SetClassWord]
mov word [ebp - 0x10], ax
movsx edx, word [ebp - 0xc]
mov dword [ebp - 0x2c], edx
cmp dword [ebp - 0x2c], 0x3fb
je 0x50089a
cmp dword [ebp - 0x2c], 0x7af
je 0x50075d
jmp 0x5008b6
mov ax, word [ebp + 8]
mov word [ebp - 0x18], ax
mov dword [ebp - 0x20], 0xff4b
lea ecx, [ebp - 0x10]
mov dword [ebp - 0x1c], ecx
mov dl, byte [ebp - 1]
mov byte [ebp - 5], dl
lea eax, [ebp - 0x20]
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x34], 0x638d
movsx ecx, byte [ebp - 3]
mov edx, dword [ebp - 0x38]
movsx eax, byte [edx]
xor ecx, eax
movsx edx, byte [ebp - 2]
cmp ecx, edx
jg 0x500877
mov al, byte [ebp - 3]
mov byte [ebp - 4], al
mov cl, byte [ebp - 1]
mov byte [ebp - 6], cl
mov dl, byte [ebp - 4]
mov byte [ebp - 0x30], dl
cmp byte [ebp - 0x30], 0x42
je 0x5007c0
cmp byte [ebp - 0x30], 0x6c
je 0x50081a
jmp 0x50086b
mov eax, dword [ebp - 0x24]
mov eax, dword [eax]
xor edx, edx
mov ecx, 0xb711
div ecx
cmp eax, dword [ebp - 0x20]
ja 0x5007e5
mov edx, dword [ebp - 0x1c]
movzx eax, word [edx]
movzx ecx, word [ebp - 0x10]
or eax, ecx
mov edx, dword [ebp - 0x1c]
mov word [edx], ax
mov eax, dword [ebp - 0x20]
sub eax, 0xe0c1
mov ecx, dword [ebp - 0x24]
mov dword [ecx], eax
mov dx, word [ebp - 0x10]
mov word [ebp + 8], dx
push pe_nt_image_headers32
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
mov dword [ebp - 0x44], eax
movzx eax, word [ebp - 0x18]
movzx ecx, word [ebp - 0x10]
add eax, ecx
mov edx, dword [ebp - 0x1c]
mov word [edx], ax
jmp 0x50086b
cmp dword [ebp - 0x34], 0x3cfe
jg 0x500859
mov eax, dword [ebp - 0x24]
mov ecx, dword [eax]
sub ecx, 0x6f2d
mov dword [ebp - 0x20], ecx
mov dx, word [ebp - 0x10]
mov word [ebp + 8], dx
movzx eax, byte [ebp - 5]
movzx ecx, byte [ebp - 1]
add eax, ecx
mov byte [ebp - 6], al
push 0xe3
mov edx, dword [ebp - 0x48]
push edx
call sub.WINSPOOL.DRV_ScheduleJob
mov dword [ebp - 0x4c], eax
jmp 0x50086b
mov eax, dword [ebp - 0x1c]
movzx ecx, word [eax]
movzx edx, word [ebp + 8]
sub ecx, edx
mov eax, dword [ebp - 0x1c]
mov word [eax], cx
lea ecx, [ebp - 0x34]
mov dword [ebp - 0x50], ecx
mov edx, dword [ebp - 0x20]
mov dword [ebp - 0x54], edx
mov ax, word [ebp - 0x10]
mov word [ebp + 8], ax
lea ecx, [ebp - 1]
push ecx
push 0xb7
lea edx, [ebp - 0x24]
push edx
mov eax, dword [ebp - 0x58]
push eax
call sub.WINSPOOL.DRV_WritePrinter
mov dword [ebp - 0x5c], eax
jmp 0x5008b6
mov cx, word [ebp - 0x10]
mov word [ebp + 8], cx
movzx edx, word [ebp - 0x14]
push edx
push 0x26
movzx eax, byte [ebp - 1]
push eax
call fcn.004ff9b0
add esp, 0xc
movsx ecx, word [ebp - 0xc]
sar ecx, 0xf
mov word [ebp - 0x14], cx
movsx edx, byte [ebp - 2]
movsx ecx, byte [ebp - 3]
shl edx, cl
mov eax, dword [ebp - 0x38]
mov byte [eax], dl
movzx ecx, word [ebp - 0x14]
push ecx
movzx edx, byte [ebp - 2]
push edx
call fcn.00500930
jmp 0x500912
mov eax, dword [ebp - 0x60]
push eax
call sub.WINSPOOL.DRV_AbortPrinter
mov dword [ebp - 0x64], eax
mov cl, byte [ebp - 1]
mov byte [ebp - 0x3c], cl
cmp byte [ebp - 0x3c], 0x60
je 0x5008fb
jmp 0x50090b
movsx edx, word [ebp - 0xc]
and edx, 0x53b
mov word [ebp - 0xc], dx
jmp 0x500912
mov cl, 0x5e
call fcn.004fff20
movzx eax, byte [ebp - 1]
add eax, 0x77
mov byte [ebp - 1], al
mov eax, 0xbb
mov esp, ebp
pop ebp
ret