Function at 0x10058581
Capabilities:
Get keyboard layout

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xd0
movzx eax, byte [ebp + 0x18]
test eax, eax
je 0x100585af
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x80], eax
push dword [ebp - 0x80]
push 1
push 0x49ea
call fcn.1005889b
add esp, 0xc
jmp 0x10058897
mov eax, dword [ebp + 0x20]
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x24], 0x2c87
mov dword [ebp - 0x38], 0x1000e270
cmp dword [ebp - 0x24], 0x2d05
jle 0x10058654
and dword [ebp - 8], 0
jmp 0x100585dd
mov eax, dword [ebp - 8]
inc eax
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0x66f
jge 0x10058646
and dword [ebp - 0x20], 0
jmp 0x100585f3
mov eax, dword [ebp - 0x20]
inc eax
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0x4da7
jge 0x10058644
and dword [ebp - 0x10], 0
jmp 0x10058609
mov eax, dword [ebp - 0x10]
inc eax
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0x9d3
jge 0x10058642
mov eax, dword [ebp - 8]
add eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x10]
sar eax, cl
cdq
mov dword [ebp - 0x90], eax
mov dword [ebp - 0x8c], edx
push dword [ebp - 0x8c]
push dword [ebp - 0x90]
mov ecx, 0x10084b98
call fcn.10020ee4
jmp 0x10058602
jmp 0x100585ec
jmp 0x100585d6
push 0
push 0
push 0
push 0
call dword [sym.imp.USER32.dll_DefDlgProcA]
mov eax, dword [ebp + 8]
mov dword [ebp - 0x58], eax
cmp dword [ebp - 0x24], 0x2b37
jge 0x10058670
mov edx, dword [ebp - 0x38]
mov ecx, 0x10084b98
call fcn.10023c34
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x78], eax
mov eax, dword [ebp + 0x24]
mov dword [ebp - 0x30], eax
lea eax, [ebp + 0x10]
mov dword [ebp - 0x70], eax
mov eax, dword [ebp + 0x1c]
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x2c], 0x2dda
mov dword [ebp - 0x6c], 0x1000e2a8
cmp dword [ebp - 0x2c], 0x3169
jle 0x1005872c
push 0
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
and dword [ebp - 0x1c], 0
jmp 0x100586b8
mov eax, dword [ebp - 0x1c]
inc eax
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0x1ffc
jge 0x10058724
and dword [ebp - 0x18], 0
jmp 0x100586ce
mov eax, dword [ebp - 0x18]
inc eax
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0x4f2f
jge 0x10058722
mov eax, dword [ebp - 0x1c]
xor eax, dword [ebp - 0x18]
cdq
mov dword [ebp - 0x9c], eax
mov dword [ebp - 0x98], edx
push dword [ebp - 0x98]
push dword [ebp - 0x9c]
lea ecx, [ebp - 0xb8]
call fcn.1001105e
pop ecx
pop ecx
mov dword [ebp - 0x74], eax
mov ecx, dword [ebp - 0x74]
call fcn.10020ec4
push eax
call fcn.10069ba3
pop ecx
lea ecx, [ebp - 0xb8]
call fcn.10020eba
jmp 0x100586c7
jmp 0x100586b1
push 0
call dword [sym.imp.ADVAPI32.dll_GetLengthSid]
mov dword [ebp - 0x28], 0xde3
mov dword [ebp - 0x64], 0x1000e300
cmp dword [ebp - 0x28], 0xe95
jle 0x100587ec
and dword [ebp - 4], 0
jmp 0x10058754
mov eax, dword [ebp - 4]
inc eax
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0x6ea4
jge 0x100587ec
mov dword [ebp - 0xa0], 0x10084634
and dword [ebp - 0xc], 0
jmp 0x10058778
mov eax, dword [ebp - 0xc]
inc eax
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0x6503
jge 0x100587e7
and dword [ebp - 0x14], 0
jmp 0x1005878e
mov eax, dword [ebp - 0x14]
inc eax
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0x65ae
jge 0x100587e5
mov eax, dword [ebp - 4]
sub eax, dword [ebp - 0xc]
sub eax, dword [ebp - 0x14]
cdq
mov dword [ebp - 0x88], eax
mov dword [ebp - 0x84], edx
push dword [ebp - 0x84]
push dword [ebp - 0x88]
lea ecx, [ebp - 0xd0]
call fcn.1001105e
pop ecx
pop ecx
mov dword [ebp - 0x40], eax
mov ecx, dword [ebp - 0x40]
call fcn.10020ec4
push eax
call fcn.10069ba3
pop ecx
lea ecx, [ebp - 0xd0]
call fcn.10020eba
jmp 0x10058787
jmp 0x10058771
jmp 0x1005874d
mov eax, dword [ebp - 0x70]
movzx eax, byte [eax]
test eax, eax
je 0x10058802
push 0
push 0
call dword [sym.imp.USER32.dll_EndPaint]
jmp 0x10058873
mov eax, dword [ebp - 0x48]
mov dword [ebp - 0x7c], eax
mov eax, dword [ebp - 0x78]
mov dword [ebp - 0x60], eax
mov eax, dword [ebp - 0x50]
mov dword [ebp - 0x94], eax
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x68], eax
mov eax, dword [ebp - 0x58]
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x7c]
mov dword [ebp - 0x54], eax
mov eax, dword [ebp - 0x60]
mov dword [ebp - 0x4c], eax
mov eax, dword [ebp - 0x94]
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x68]
mov dword [ebp - 0x5c], eax
mov eax, dword [ebp - 0x34]
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x3c]
push dword [eax]
push dword [ebp - 0x44]
mov eax, dword [ebp - 0x4c]
push dword [eax]
push 0x60f3
push 0x1f92
mov eax, dword [ebp - 0x54]
push dword [eax]
push 0
mov eax, dword [ebp - 0x5c]
push dword [eax]
push 1
push 1
call fcn.100539b0
add esp, 0x28
cmp dword [ebp - 0x28], 0xd6d
jge 0x10058885
push dword [ebp - 0x64]
call fcn.10069ba3
pop ecx
cmp dword [ebp - 0x2c], 0x2c83
jge 0x10058897
push dword [ebp - 0x6c]
call fcn.10069ba3
pop ecx
mov esp, ebp
pop ebp
ret