Function at 0x1004c9bd
Capabilities:
Get keyboard layout

Disassembly:
push 0x30
mov eax, 0x10020149
call fcn.1001d38d
mov ebx, ecx
mov edi, dword [ebp + 0xc]
xor esi, esi
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x30], esi
mov dword [ebp - 0x3c], ebx
test ebx, ebx
je 0x1004c9f0
mov eax, dword [ebx]
push ebx
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x1005d484]
call esi
mov esi, dword [ebp - 0x30]
and dword [ebp - 4], 0
sub dword [ebp + 8], 2
jne 0x1004ccd5
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 dword [ebp - 0x38], edx
mov byte [ebp - 4], 2
mov ecx, dword [ebx + 0xfc]
mov dword [ebp - 0x34], edx
test ecx, ecx
je 0x1004ca6f
mov eax, dword [ecx]
push dword [ebx + 0x100]
push ecx
mov esi, dword [eax + 0x10]
mov ecx, esi
call dword [0x1005d484]
call esi
mov esi, eax
lea ecx, [ebx + 0xfc]
mov dword [ebp - 0x30], esi
call fcn.10031fb0
xor edx, edx
mov dword [ebx + 0x100], edx
lea ecx, [ebx + 0x4c]
cmp dword [ecx], edx
je 0x1004ca7f
xor edx, edx
call fcn.1000fa21
xor edx, edx
test edi, edi
jne 0x1004cabd
cmp byte [ebx + 0xe0], 0
je 0x1004caa2
push edx
push edx
push edx
push edx
mov edx, dword [ebx + 0x5c]
mov cl, 1
call fcn.10016830
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.1004f3b0
jmp 0x1004ccc5
mov eax, dword [edi]
mov esi, dword [eax + 0x18]
lea eax, [ebp - 0x24]
push eax
push edi
mov ecx, esi
call dword [0x1005d484]
call esi
mov ecx, dword [ebp - 0x24]
call fcn.10052703
test al, al
jne 0x1004cc5b
mov eax, dword [ebp - 0x24]
test eax, eax
je 0x1004cafc
mov ecx, dword [eax]
mov esi, dword [ecx + 0x24]
lea ecx, [ebp - 0x38]
push ecx
push eax
mov ecx, esi
call dword [0x1005d484]
call esi
mov eax, dword [ebp - 0x38]
test eax, eax
je 0x1004cb17
mov ecx, dword [eax]
mov esi, dword [ecx + 0x18]
lea ecx, [ebp - 0x34]
push ecx
push eax
mov ecx, esi
call dword [0x1005d484]
call esi
push 0
push ecx
mov ecx, ebx
call fcn.1004f3b0
mov edx, dword [ebx + 0x5c]
test edx, edx
je 0x1004cb63
cmp byte [ebx + 0xe0], 0
je 0x1004cb45
xor eax, eax
mov cl, 1
push eax
push eax
push eax
push eax
call fcn.10016830
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 0x1004cb6f
lea ecx, [ebx + 0xc0]
lea edx, [ebx + 0xd0]
mov eax, dword [ebp - 0x34]
test eax, eax
je 0x1004cbdb
cmp dword [ebx + 0x5c], eax
je 0x1004cb9e
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.10016830
mov eax, dword [ebp - 0x34]
push 0
mov dword [ebx + 0x5c], eax
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
mov ecx, dword [ebx + 0x5c]
mov edx, eax
call fcn.10056772
push 0
push 1
push dword [ebp - 0x24]
mov ecx, ebx
mov byte [ebx + 0x70], al
call fcn.1004dabf
push ecx
push dword [ebp - 0x24]
mov ecx, ebx
call fcn.1004c61b
push dword [ebp - 0x24]
mov ecx, ebx
call fcn.1004f615
jmp 0x1004cc58
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.1002ccb9
test al, al
jne 0x1004cc48
call fcn.1002ce76
test al, al
jne 0x1004cc48
lea eax, [ebp - 0x20]
push eax
call dword [sym.imp.USER32.dll_SetRectEmpty]
mov eax, dword [0x1005c494]
xor ecx, ecx
test eax, eax
je 0x1004cc23
mov byte [ebp - 0x28], 1
cmp dword [eax + 0x58], ecx
jne 0x1004cc26
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.10056af3
push ecx
mov ecx, ebx
call fcn.10050aff
xor eax, eax
xor edx, edx
push eax
push eax
push eax
push 3
mov cl, 1
call fcn.10016830
mov edi, dword [ebp - 0x2c]
cmp dword [ebx + 0xfc], 0
jne 0x1004ccc2
and dword [ebp - 0x28], 0
mov byte [ebp - 4], 3
mov ecx, dword [ebx + 0x34]
test ecx, ecx
je 0x1004ccba
mov eax, dword [ecx]
mov esi, dword [eax + 0x1c]
lea eax, [ebp - 0x28]
push eax
push ecx
mov ecx, esi
call dword [0x1005d484]
call esi
test eax, eax
js 0x1004ccba
cmp dword [ebp - 0x28], edi
jne 0x1004ccba
and dword [ebp - 0x2c], 0
lea edx, [ebp - 0x2c]
mov byte [ebp - 4], 4
push edx
lea eax, [ebx + 0x100]
push edi
lea ecx, [ebx + 0x14]
push eax
lea edx, [ebx + 0xfc]
call fcn.1005197e
lea ecx, [ebp - 0x2c]
call fcn.10010a7e
lea ecx, [ebp - 0x28]
call fcn.10010a7e
mov esi, dword [ebp - 0x30]
lea ecx, [ebp - 0x38]
call fcn.1002dee9
lea ecx, [ebp - 0x24]
call fcn.1002dee9
lea ecx, [ebp - 0x3c]
call fcn.10010a7e
mov eax, esi
call fcn.1001d32a
ret 0xc