Function at 0x1002498c
Capabilities:
Get keyboard layout

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff54
push ebx
push esi
push edi
mov esi, ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
xor eax, eax
mov dword [ebp - 0x30], eax
xor eax, eax
mov dword [ebp - 0x28], eax
xor eax, eax
mov dword [ebp - 0x38], eax
lea edx, [ebp - 0x20]
mov ecx, 4
mov eax, dword [ebp - 8]
mov ebx, dword [eax]
call dword [ebx + 0xc]
cmp dword [ebp - 0x20], 0xc
sete byte [ebp - 0x21]
cmp byte [ebp - 0x21], 0
je 0x100249d4
mov dword [ebp - 0x20], 0x28
mov eax, dword [ebp - 0x20]
add eax, 0xc
add eax, 0x400
call fcn.100026dc
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x3c], eax
xor edx, edx
push ebp
push 0x10024ea9
push dword fs:[edx]
mov dword fs:[edx], esp
xor edx, edx
push ebp
push 0x10024e7c
push dword fs:[edx]
mov dword fs:[edx], esp
cmp byte [ebp - 0x21], 0
je 0x10024a5b
lea edx, [ebp - 0x48]
add edx, 4
mov ecx, 8
mov eax, dword [ebp - 8]
mov ebx, dword [eax]
call dword [ebx + 0xc]
mov ebx, dword [ebp - 0x3c]
mov eax, ebx
xor ecx, ecx
mov edx, 0x28
call fcn.10002cf0
mov eax, ebx
movzx edx, word [ebp - 0x44]
mov dword [eax + 4], edx
movzx edx, word [ebp - 0x42]
mov dword [eax + 8], edx
mov dx, word [ebp - 0x40]
mov word [eax + 0xc], dx
mov dx, word [ebp - 0x3e]
mov word [eax + 0xe], dx
sub esi, 0xc
jmp 0x10024b28
mov ecx, dword [ebp - 0x20]
sub ecx, 4
mov edx, dword [ebp - 0x18]
add edx, 4
mov eax, dword [ebp - 8]
mov ebx, dword [eax]
call dword [ebx + 0xc]
sub esi, dword [ebp - 0x20]
mov eax, dword [ebp - 0x3c]
mov eax, dword [eax + 0x10]
cmp eax, 3
je 0x10024b28
test eax, eax
je 0x10024b28
mov dl, 1
mov eax, dword [0x10015940]
call fcn.10003318
mov dword [ebp - 0x38], eax
cmp dword [ebp + 8], 0
jne 0x10024acd
lea eax, [ebp - 0xaa]
xor ecx, ecx
mov edx, 0xe
call fcn.10002cf0
mov word [ebp - 0xaa], 0x4d42
mov eax, dword [ebp - 0x20]
add eax, esi
mov dword [ebp - 0xa8], eax
lea eax, [ebp - 0xaa]
mov dword [ebp + 8], eax
mov edx, dword [ebp + 8]
mov ecx, 0xe
mov eax, dword [ebp - 0x38]
mov ebx, dword [eax]
call dword [ebx + 0x10]
lea edx, [ebp - 0x20]
mov ecx, 4
mov eax, dword [ebp - 0x38]
mov ebx, dword [eax]
call dword [ebx + 0x10]
mov ecx, dword [ebp - 0x20]
sub ecx, 4
mov edx, dword [ebp - 0x18]
add edx, 4
mov eax, dword [ebp - 0x38]
mov ebx, dword [eax]
call dword [ebx + 0x10]
mov eax, esi
xor edx, edx
push edx
push eax
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0x38]
call fcn.10019580
mov edx, esi
neg edx
mov cx, 2
mov eax, dword [ebp - 0x38]
mov ebx, dword [eax]
call dword [ebx + 0x14]
mov eax, dword [ebp - 0x38]
mov dword [ebp - 8], eax
mov ebx, dword [ebp - 0x3c]
mov eax, dword [ebp - 0x20]
mov dword [ebx], eax
mov eax, dword [ebp - 0x18]
add eax, dword [ebp - 0x20]
mov dword [ebp - 0x1c], eax
cmp word [ebx + 0xc], 1
je 0x10024b45
call fcn.100219d8
cmp dword [ebp - 0x20], 0x28
jne 0x10024b78
mov ax, word [ebx + 0xe]
cmp ax, 0x10
je 0x10024b5b
cmp ax, 0x20
jne 0x10024b78
cmp dword [ebx + 0x10], 3
jne 0x10024b78
mov edx, dword [ebp - 0x1c]
mov ecx, 0xc
mov eax, dword [ebp - 8]
call fcn.10019510
add dword [ebp - 0x1c], 0xc
sub esi, 0xc
cmp dword [ebx + 0x20], 0
jne 0x10024b8a
mov ax, word [ebx + 0xe]
call fcn.10021c5c
mov dword [ebx + 0x20], eax
mov ecx, dword [ebx + 0x20]
movzx edi, byte [ebp - 0x21]
xor eax, eax
mov al, byte [edi + 0x10076700]
imul ecx, eax
mov edx, dword [ebp - 0x1c]
mov eax, dword [ebp - 8]
call fcn.10019510
mov eax, dword [ebx + 0x20]
xor edx, edx
mov dl, byte [edi + 0x10076700]
imul edx
sub esi, eax
cmp dword [ebx + 0x14], 0
jne 0x10024bdd
movzx edx, word [ebx + 0xe]
mov eax, dword [ebx + 4]
mov ecx, 0x20
call fcn.10021c7c
mov ecx, eax
mov eax, dword [ebx + 8]
cdq
xor eax, edx
sub eax, edx
imul ecx, eax
mov dword [ebx + 0x14], ecx
mov eax, dword [ebx + 0x14]
cmp esi, eax
jbe 0x10024be6
mov esi, eax
cmp byte [ebp - 0x21], 0
je 0x10024bf4
mov eax, dword [ebp - 0x1c]
call fcn.10021f24
push 0
call fcn.10006b04
call fcn.10021aec
mov dword [ebp - 0xc], eax
xor edx, edx
push ebp
push 0x10024df7
push dword fs:[edx]
mov dword fs:[edx], esp
mov eax, dword [ebp - 0x3c]
mov eax, dword [eax + 0x10]
test eax, eax
je 0x10024c20
cmp eax, 3
jne 0x10024c2d
cmp byte [0x10076470], 0
je 0x10024d66
xor eax, eax
mov dword [ebp - 0x10], eax
mov eax, esi
call fcn.100026dc
mov dword [ebp - 0x14], eax
xor edx, edx
push ebp
push 0x10024d5f
push dword fs:[edx]
mov dword fs:[edx], esp
mov edx, dword [ebp - 0x14]
mov ecx, esi
mov eax, dword [ebp - 8]
call fcn.10019510
mov eax, dword [ebp - 0xc]
push eax
call sub.gdi32.dll_CreateCompatibleDC
call fcn.10021aec
mov dword [ebp - 0x10], eax
push 1
push 1
mov eax, dword [ebp - 0xc]
push eax
call sub.gdi32.dll_CreateCompatibleBitmap
push eax
mov eax, dword [ebp - 0x10]
push eax
call sub.gdi32.dll_SelectObject
mov dword [ebp - 0x2c], eax
xor eax, eax
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x3c]
mov eax, dword [eax + 0x20]
test eax, eax
jbe 0x10024cbb
mov ecx, eax
mov edx, dword [ebp - 0x1c]
xor eax, eax
call fcn.100221dc
mov dword [ebp - 0x30], eax
push 0
mov eax, dword [ebp - 0x30]
push eax
mov eax, dword [ebp - 0x10]
push eax
call sub.gdi32.dll_SelectPalette
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x10]
push eax
call sub.gdi32.dll_RealizePalette
xor edx, edx
push ebp
push 0x10024d33
push dword fs:[edx]
mov dword fs:[edx], esp
push 0
mov eax, dword [ebp - 0x18]
push eax
mov edx, dword [ebp - 0x14]
push edx
push 4
push eax
mov eax, dword [ebp - 0x10]
push eax
call sub.gdi32.dll_CreateDIBitmap
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0
jne 0x10024cfd
call sub.user32.dll_GetKeyboardLayout
test eax, eax
jne 0x10024cf8
call fcn.100219d8
jmp 0x10024cfd
call fcn.1000d264
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x10024d3a
cmp dword [ebp - 0x34], 0
je 0x10024d1f
push 0xffffffffffffffff
mov eax, dword [ebp - 0x34]
push eax
mov eax, dword [ebp - 0x10]
push eax
call sub.gdi32.dll_SelectPalette
mov eax, dword [ebp - 0x2c]
push eax
mov eax, dword [ebp - 0x10]
push eax
call sub.gdi32.dll_SelectObject
push eax
call sub.gdi32.dll_DeleteObject
ret
push 0
push 0
lea eax, [ebp - 0x14]
push eax
push 0
mov eax, dword [ebp - 0x18]
push eax
mov eax, dword [ebp - 0xc]
push eax
call sub.gdi32.dll_CreateDIBSection
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0
je 0x10024d8c
cmp dword [ebp - 0x14], 0
jne 0x10024da1
call sub.user32.dll_GetKeyboardLayout
test eax, eax
jne 0x10024d9c
call fcn.100219d8
jmp 0x10024da1
call fcn.1000d264
xor eax, eax
push ebp
push 0x10024dc6
push dword fs:[eax]
mov dword fs:[eax], esp
mov edx, dword [ebp - 0x14]
mov ecx, esi
mov eax, dword [ebp - 8]
call fcn.10019510
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x10024dde
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x10024dfe
mov eax, dword [ebp - 0xc]
push eax
push 0
call fcn.10006d5c
ret