Function at 0x10051d1a
Capabilities:
Get keyboard layout

Disassembly:
push 0x30
mov eax, 0x1002209e
call fcn.1001c72d
mov ebx, ecx
and dword [ebp - 0x38], 0
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x3c], ebx
test ebx, ebx
je 0x10051d49
mov eax, dword [ebx]
push ebx
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x10064524]
call esi
and dword [ebp - 4], 0
sub dword [ebp + 8], 2
jne 0x10052085
mov byte [ebx + 0x48], 0
push dword [ebx + 0x3c]
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
and dword [ebx + 0x3c], 0
push dword [ebx + 0x40]
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
and dword [ebx + 0x40], 0
push dword [ebx + 0x44]
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
xor edx, edx
mov dword [ebx + 0x44], edx
mov dword [ebp - 0x24], edx
mov byte [ebp - 4], 1
mov dword [ebp - 0x34], edx
mov byte [ebp - 4], 2
mov ecx, dword [ebx + 0xfc]
mov dword [ebp - 0x30], edx
test ecx, ecx
je 0x10051dca
mov eax, dword [ecx]
push dword [ebx + 0x100]
push ecx
mov esi, dword [eax + 0x10]
mov ecx, esi
call dword [0x10064524]
call esi
lea ecx, [ebx + 0xfc]
mov dword [ebp - 0x38], eax
call fcn.10036658
xor edx, edx
mov dword [ebx + 0x100], edx
lea ecx, [ebx + 0x4c]
cmp dword [ecx], edx
je 0x10051dda
xor edx, edx
call fcn.100137f6
xor edx, edx
test edi, edi
jne 0x10051e18
cmp byte [ebx + 0xe0], 0
je 0x10051dfd
push edx
push edx
push edx
push edx
mov edx, dword [ebx + 0x5c]
mov cl, 1
call fcn.10018650
xor edx, edx
mov byte [ebx + 0xe0], dl
push 8
pop ecx
xor eax, eax
lea edi, [ebx + 0xc0]
rep stosd dword es:[edi], eax
push edx
push ecx
mov ecx, ebx
call fcn.10054ac2
jmp 0x1005204f
mov eax, dword [edi]
lea ecx, [ebp - 0x24]
push ecx
push edi
mov esi, dword [eax + 0x18]
mov ecx, esi
call dword [0x10064524]
call esi
mov ecx, dword [ebp - 0x24]
call fcn.1005810a
test al, al
jne 0x10051fb6
mov eax, dword [ebp - 0x24]
test eax, eax
je 0x10051e57
mov ecx, dword [eax]
lea edx, [ebp - 0x34]
push edx
push eax
mov esi, dword [ecx + 0x24]
mov ecx, esi
call dword [0x10064524]
call esi
mov eax, dword [ebp - 0x34]
test eax, eax
je 0x10051e72
mov ecx, dword [eax]
lea edx, [ebp - 0x30]
push edx
push eax
mov esi, dword [ecx + 0x18]
mov ecx, esi
call dword [0x10064524]
call esi
push 0
push ecx
mov ecx, ebx
call fcn.10054ac2
mov edx, dword [ebx + 0x5c]
test edx, edx
je 0x10051ebe
cmp byte [ebx + 0xe0], 0
je 0x10051ea0
xor eax, eax
mov cl, 1
push eax
push eax
push eax
push eax
call fcn.10018650
mov byte [ebx + 0xe0], 0
xor eax, eax
lea edx, [ebx + 0xd0]
mov edi, edx
lea ecx, [ebx + 0xc0]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
xor eax, eax
mov edi, ecx
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
jmp 0x10051eca
lea ecx, [ebx + 0xc0]
lea edx, [ebx + 0xd0]
mov eax, dword [ebp - 0x30]
test eax, eax
je 0x10051f36
cmp dword [ebx + 0x5c], eax
je 0x10051ef9
xor eax, eax
mov edi, ecx
mov cl, 1
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
xor eax, eax
mov edi, edx
xor edx, edx
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
xor eax, eax
push eax
push eax
push eax
push 3
call fcn.10018650
mov eax, dword [ebp - 0x30]
push 0
mov dword [ebx + 0x5c], eax
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
mov ecx, dword [ebx + 0x5c]
mov edx, eax
call fcn.1005c3dd
push 0
push 1
push dword [ebp - 0x24]
mov ecx, ebx
mov byte [ebx + 0x70], al
call fcn.10052fe9
push ecx
push dword [ebp - 0x24]
mov ecx, ebx
call fcn.10051985
push dword [ebp - 0x24]
mov ecx, ebx
call fcn.10054d57
jmp 0x10051fb3
and dword [ebx + 0x5c], 0
xor eax, eax
mov byte [ebx + 0x70], 0
mov edi, ecx
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
xor eax, eax
mov edi, edx
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
call fcn.1003119e
test al, al
jne 0x10051fa3
call fcn.10031349
test al, al
jne 0x10051fa3
lea eax, [ebp - 0x20]
push eax
call dword [sym.imp.USER32.dll_SetRectEmpty]
mov eax, dword [0x1006346c]
xor ecx, ecx
test eax, eax
je 0x10051f7e
mov byte [ebp - 0x28], 1
cmp dword [eax + 0x58], ecx
jne 0x10051f81
mov byte [ebp - 0x28], cl
push dword [ebp - 0x28]
lea eax, [ebp - 0x20]
xor dl, dl
push ecx
push ecx
push ecx
push eax
push ecx
push ecx
push ecx
push 1
push ecx
push ecx
xor cl, cl
call fcn.1005c71f
push ecx
mov ecx, ebx
call fcn.100563d5
xor eax, eax
xor edx, edx
push eax
push eax
push eax
push 3
mov cl, 1
call fcn.10018650
mov edi, dword [ebp - 0x2c]
cmp dword [ebx + 0xfc], 0
jne 0x1005204f
and dword [ebp - 0x28], 0
mov byte [ebp - 4], 3
mov ecx, dword [ebx + 0x34]
test ecx, ecx
je 0x10052034
mov eax, dword [ecx]
lea edx, [ebp - 0x28]
push edx
push ecx
mov esi, dword [eax + 0x1c]
mov ecx, esi
call dword [0x10064524]
call esi
test eax, eax
js 0x10052034
cmp dword [ebp - 0x28], edi
jne 0x10052034
and dword [ebp - 0x2c], 0
lea eax, [ebp - 0x2c]
mov byte [ebp - 4], 4
push eax
mov ecx, ebx
lea eax, [ebx + 0x100]
neg ecx
lea edx, [ebx + 0xfc]
push edi
push eax
lea eax, [ebx + 0x14]
sbb ecx, ecx
and ecx, eax
call fcn.100572ca
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0x2c]
test eax, eax
je 0x10052034
mov ecx, dword [eax]
push eax
mov esi, dword [ecx + 8]
mov ecx, esi
call dword [0x10064524]
call esi
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x28]
test eax, eax
je 0x1005204f
mov ecx, dword [eax]
push eax
mov esi, dword [ecx + 8]
mov ecx, esi
call dword [0x10064524]
call esi
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x34]
test eax, eax
je 0x1005206a
mov ecx, dword [eax]
push eax
mov esi, dword [ecx + 8]
mov ecx, esi
call dword [0x10064524]
call esi
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x24]
test eax, eax
je 0x10052085
mov ecx, dword [eax]
push eax
mov esi, dword [ecx + 8]
mov ecx, esi
call dword [0x10064524]
call esi
mov dword [ebp - 4], 5
test ebx, ebx
je 0x100520a0
mov eax, dword [ebx]
push ebx
mov esi, dword [eax + 8]
mov ecx, esi
call dword [0x10064524]
call esi
or dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x38]
call fcn.1001c6dc
ret 0xc