Function at 0x50481c
Capabilities:
Get keyboard layout

Disassembly:
push ebp
mov ebp, esp
mov ecx, 0x23
push 0
push 0
dec ecx
jne 0x504824
push ebx
mov ebx, 0x6da2a4
xor eax, eax
push ebp
push 0x504e21
push dword fs:[eax]
mov dword fs:[eax], esp
cmp byte [0x6dbdd8], 0
jne 0x504de3
mov byte [0x6dbdd8], 1
mov eax, 0x504e38
call fcn.00517f60
test al, al
je 0x504878
lea edx, [ebp - 4]
mov eax, 0x504e38
call fcn.00517d60
mov eax, dword [ebp - 4]
call fcn.005045b0
jmp 0x5048e5
lea edx, [ebp - 8]
mov al, 0x4c
call fcn.00518034
mov eax, dword [ebp - 8]
xor edx, edx
call fcn.004061e8
je 0x5048ad
lea edx, [ebp - 0x10]
mov al, 0x4c
call fcn.00518034
mov edx, dword [ebp - 0x10]
lea eax, [ebp - 0xc]
call fcn.00405938
mov eax, dword [ebp - 0xc]
call fcn.005045b0
jmp 0x5048e5
push 0
call sub.user32.dll_GetKeyboardLayout
and eax, 0x3ff
sub eax, 1
jb 0x5048cf
sub eax, 6
jne 0x5048db
mov eax, 0x504e48
call fcn.005045b0
jmp 0x5048e5
mov eax, 0x504e54
call fcn.005045b0
jmp 0x5048e5
mov eax, 0x504e54
call fcn.005045b0
mov dl, 1
mov eax, dword [0x498544]
call fcn.00498bc4
mov dword [ebx], eax
mov eax, dword [ebx]
call fcn.00498f7c
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x18]
mov edx, dword [0x6dab08]
call fcn.00405938
mov ecx, dword [ebp - 0x18]
xor edx, edx
mov eax, dword [ebx]
call fcn.00498e54
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x20]
mov edx, dword [0x6dab0c]
call fcn.00405938
mov ecx, dword [ebp - 0x20]
mov edx, 1
mov eax, dword [ebx]
call fcn.00498e54
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x28]
mov edx, dword [0x6dab10]
call fcn.00405938
mov ecx, dword [ebp - 0x28]
mov edx, 2
mov eax, dword [ebx]
call fcn.00498e54
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x30]
mov edx, dword [0x6dab14]
call fcn.00405938
mov ecx, dword [ebp - 0x30]
mov edx, 3
mov eax, dword [ebx]
call fcn.00498e54
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0x38]
mov edx, dword [0x6dab18]
call fcn.00405938
mov ecx, dword [ebp - 0x38]
mov edx, 0x104
mov eax, dword [ebx]
call fcn.00498e54
lea eax, [ebp - 0x3c]
push eax
lea eax, [ebp - 0x40]
mov edx, dword [0x6dab1c]
call fcn.00405938
mov ecx, dword [ebp - 0x40]
mov edx, 0x106
mov eax, dword [ebx]
call fcn.00498e54
lea eax, [ebp - 0x44]
push eax
lea eax, [ebp - 0x48]
mov edx, dword [0x6dab20]
call fcn.00405938
mov ecx, dword [ebp - 0x48]
mov edx, 0x108
mov eax, dword [ebx]
call fcn.00498e54
lea eax, [ebp - 0x4c]
push eax
lea eax, [ebp - 0x50]
mov edx, dword [0x6dab24]
call fcn.00405938
mov ecx, dword [ebp - 0x50]
mov edx, 0x204
mov eax, dword [ebx]
call fcn.00498e54
lea eax, [ebp - 0x54]
push eax
lea eax, [ebp - 0x58]
mov edx, dword [0x6dab28]
call fcn.00405938
mov ecx, dword [ebp - 0x58]
mov edx, 0x206
mov eax, dword [ebx]
call fcn.00498e54
lea eax, [ebp - 0x5c]
push eax
lea eax, [ebp - 0x60]
mov edx, dword [0x6dab2c]
call fcn.00405938
mov ecx, dword [ebp - 0x60]
mov edx, 0x208
mov eax, dword [ebx]
call fcn.00498e54
lea eax, [ebp - 0x64]
push eax
lea eax, [ebp - 0x68]
mov edx, dword [0x6dab30]
call fcn.00405938
mov ecx, dword [ebp - 0x68]
mov edx, 0x304
mov eax, dword [ebx]
call fcn.00498e54
lea eax, [ebp - 0x6c]
push eax
lea eax, [ebp - 0x70]
mov edx, dword [0x6dab34]
call fcn.00405938
mov ecx, dword [ebp - 0x70]
mov edx, 0x306
mov eax, dword [ebx]
call fcn.00498e54
lea eax, [ebp - 0x74]
push eax
lea eax, [ebp - 0x78]
mov edx, dword [0x6dab38]
call fcn.00405938
mov ecx, dword [ebp - 0x78]
mov edx, 0x308
mov eax, dword [ebx]
call fcn.00498e54
lea eax, [ebp - 0x7c]
push eax
lea eax, [ebp - 0x80]
mov edx, dword [0x6dab3c]
call fcn.00405938
mov ecx, dword [ebp - 0x80]
mov edx, 0x404
mov eax, dword [ebx]
call fcn.00498e54
lea eax, [ebp - 0x84]
push eax
lea eax, [ebp - 0x88]
mov edx, dword [0x6dab40]
call fcn.00405938
mov ecx, dword [ebp - 0x88]
mov edx, 0x406
mov eax, dword [ebx]
call fcn.00498e54
lea eax, [ebp - 0x8c]
push eax
lea eax, [ebp - 0x90]
mov edx, dword [0x6dab44]
call fcn.00405938
mov ecx, dword [ebp - 0x90]
mov edx, 0x408
mov eax, dword [ebx]
call fcn.00498e54
lea eax, [ebp - 0x94]
push eax
lea eax, [ebp - 0x98]
mov edx, dword [0x6dab48]
call fcn.00405938
mov ecx, dword [ebp - 0x98]
mov edx, 0x506
mov eax, dword [ebx]
call fcn.00498e54
lea eax, [ebp - 0x9c]
push eax
lea eax, [ebp - 0xa0]
mov edx, dword [0x6dab4c]
call fcn.00405938
mov ecx, dword [ebp - 0xa0]
mov edx, 0x508
mov eax, dword [ebx]
call fcn.00498e54
lea eax, [ebp - 0xa4]
push eax
lea eax, [ebp - 0xa8]
mov edx, dword [0x6dab50]
call fcn.00405938
mov ecx, dword [ebp - 0xa8]
mov edx, 0x604
mov eax, dword [ebx]
call fcn.00498e54
lea eax, [ebp - 0xac]
push eax
lea eax, [ebp - 0xb0]
mov edx, dword [0x6dab54]
call fcn.00405938
mov ecx, dword [ebp - 0xb0]
mov edx, 0x606
mov eax, dword [ebx]
call fcn.00498e54
lea eax, [ebp - 0xb4]
push eax
lea eax, [ebp - 0xb8]
mov edx, dword [0x6dab58]
call fcn.00405938
mov ecx, dword [ebp - 0xb8]
mov edx, 0x608
mov eax, dword [ebx]
call fcn.00498e54
lea eax, [ebp - 0xbc]
push eax
lea eax, [ebp - 0xc0]
mov edx, dword [0x6dab5c]
call fcn.00405938
mov ecx, dword [ebp - 0xc0]
mov edx, 0x704
mov eax, dword [ebx]
call fcn.00498e54
lea eax, [ebp - 0xc4]
push eax
lea eax, [ebp - 0xc8]
mov edx, dword [0x6dab60]
call fcn.00405938
mov ecx, dword [ebp - 0xc8]
mov edx, 0x706
mov eax, dword [ebx]
call fcn.00498e54
lea eax, [ebp - 0xcc]
push eax
lea eax, [ebp - 0xd0]
mov edx, dword [0x6dab64]
call fcn.00405938
mov ecx, dword [ebp - 0xd0]
mov edx, 0x804
mov eax, dword [ebx]
call fcn.00498e54
lea eax, [ebp - 0xd4]
push eax
lea eax, [ebp - 0xd8]
mov edx, dword [0x6dab68]
call fcn.00405938
mov ecx, dword [ebp - 0xd8]
mov edx, 0x808
mov eax, dword [ebx]
call fcn.00498e54
lea eax, [ebp - 0xdc]
push eax
lea eax, [ebp - 0xe0]
mov edx, dword [0x6dab6c]
call fcn.00405938
mov ecx, dword [ebp - 0xe0]
mov edx, 0x904
mov eax, dword [ebx]
call fcn.00498e54
lea eax, [ebp - 0xe4]
push eax
lea eax, [ebp - 0xe8]
mov edx, dword [0x6dab70]
call fcn.00405938
mov ecx, dword [ebp - 0xe8]
mov edx, 0x906
mov eax, dword [ebx]
call fcn.00498e54
lea eax, [ebp - 0xec]
push eax
lea eax, [ebp - 0xf0]
mov edx, dword [0x6dab74]
call fcn.00405938
mov ecx, dword [ebp - 0xf0]
mov edx, 0x908
mov eax, dword [ebx]
call fcn.00498e54
lea eax, [ebp - 0xf4]
push eax
lea eax, [ebp - 0xf8]
mov edx, dword [0x6dab78]
call fcn.00405938
mov ecx, dword [ebp - 0xf8]
mov edx, 0xa06
mov eax, dword [ebx]
call fcn.00498e54
lea eax, [ebp - 0xfc]
push eax
lea eax, [ebp - 0x100]
mov edx, dword [0x6dab7c]
call fcn.00405938
mov ecx, dword [ebp - 0x100]
mov edx, 0xb06
mov eax, dword [ebx]
call fcn.00498e54
lea eax, [ebp - 0x104]
push eax
lea eax, [ebp - 0x108]
mov edx, dword [0x6dab80]
call fcn.00405938
mov ecx, dword [ebp - 0x108]
mov edx, 0xc06
mov eax, dword [ebx]
call fcn.00498e54
lea eax, [ebp - 0x10c]
push eax
lea eax, [ebp - 0x110]
mov edx, dword [0x6dab84]
call fcn.00405938
mov ecx, dword [ebp - 0x110]
mov edx, 0xc07
mov eax, dword [ebx]
call fcn.00498e54
lea eax, [ebp - 0x114]
push eax
lea eax, [ebp - 0x118]
mov edx, dword [0x6dab88]
call fcn.00405938
mov ecx, dword [ebp - 0x118]
mov edx, 0xc08
mov eax, dword [ebx]
call fcn.00498e54
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x504e28
lea eax, [ebp - 0x118]
mov edx, 0x42
call fcn.004056a8
lea eax, [ebp - 0x10]
call fcn.00405ebc
lea eax, [ebp - 0xc]
call fcn.00405684
lea eax, [ebp - 8]
call fcn.00405ebc
lea eax, [ebp - 4]
call fcn.00405684
ret