Function at 0x42f940
Capabilities:
Get keyboard layout

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x46f45d
mov eax, dword fs:[0]
push eax
sub esp, 0x50
mov eax, dword [0x495580]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, ecx
mov dword [ebp - 0x40], eax
mov edx, eax
lea ecx, [ebp - 0x2c]
call fcn.0040d6a0
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x30]
mov edx, dword [eax]
call fcn.0042f7e0
mov byte [ebp - 4], 2
or ebx, 0xffffffff
mov edx, dword [ebp - 0x2c]
mov eax, ebx
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x42f9ac
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea ecx, [ebp - 0x38]
call fcn.0040de10
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x2c]
mov edx, dword [eax]
call fcn.0042f7e0
mov byte [ebp - 4], 5
mov eax, ebx
mov edx, dword [ebp - 0x38]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x42f9e0
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov esi, dword [ebp - 0x2c]
test esi, esi
je 0x42fb8d
mov edi, dword [ebp - 0x30]
push esi
push edi
call fcn.004548a3
add esp, 8
mov dword [ebp - 0x30], eax
add esi, 0xfffffff0
mov ecx, ebx
lock xadd dword [esi + 0xc], ecx
dec ecx
test ecx, ecx
jg 0x42fa12
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov dword [ebp - 4], 0xffffffff
add edi, 0xfffffff0
mov eax, ebx
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x42fa30
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
cmp dword [ebp - 0x30], 0
jne 0x42fb6f
mov dword [ebp - 4], 7
call fcn.004363ea
mov ecx, eax
mov byte [ebp - 4], 6
test ecx, ecx
je 0x42fb8d
mov eax, dword [ecx]
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x2c], esi
lea eax, [ebp - 0x24]
mov dword [ebp - 4], 8
push eax
call dword [sym.imp.USER32.dll_GetKeyboardLayoutNameW]
test eax, eax
je 0x42fb5a
lea ecx, [ebp - 0x24]
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x42fa80
sub ecx, edx
lea eax, [ebp - 0x24]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x2c]
call fcn.00403e20
mov esi, dword [ebp - 0x2c]
lea edx, [ebp - 0x3c]
mov ecx, esi
call fcn.00419d30
mov byte [ebp - 0x25], al
add esi, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
mov ecx, ebx
lock xadd dword [esi + 0xc], ecx
dec ecx
test ecx, ecx
jg 0x42facd
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov al, byte [ebp - 0x25]
test al, al
je 0x42fb6f
lea ecx, [ebp - 0x5c]
call fcn.00413220
mov dword [ebp - 4], 9
lea edx, [ebp - 0x5c]
push ecx
mov ecx, dword [ebp - 0x3c]
call fcn.004148b0
add esp, 4
test al, al
jne 0x42fb05
lea ecx, [ebp - 0x5c]
xor bl, bl
call fcn.00413320
mov al, bl
jmp 0x42fb71
mov edx, dword [ebp - 0x40]
lea ecx, [ebp - 0x34]
call fcn.0040d4b0
mov byte [ebp - 4], 0xa
mov eax, dword [ebp - 0x54]
test eax, eax
je 0x42fb8d
push eax
push dword [ebp - 0x34]
call fcn.004548a3
add esp, 8
test eax, eax
mov eax, dword [ebp - 0x34]
sete byte [ebp - 0x25]
add eax, 0xfffffff0
lock xadd dword [eax + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x42fb4b
mov ecx, dword [eax]
push eax
mov edx, dword [ecx]
call dword [edx + 4]
mov al, byte [ebp - 0x25]
mov byte [ebp - 0x25], al
mov bl, byte [ebp - 0x25]
lea ecx, [ebp - 0x5c]
call fcn.00413320
mov al, bl
jmp 0x42fb71
lea edx, [esi - 0x10]
lock xadd dword [edx + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x42fb6f
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0044ae3d
mov esp, ebp
pop ebp
ret
push 0x80004005
call fcn.00404410
int3