Function at 0x41dc40
Capabilities:
Get keyboard layout

Disassembly:
push 0xffffffffffffffff
push 0x529dfe
mov eax, dword fs:[0]
push eax
sub esp, 0x424
mov eax, dword [0x56b1dc]
xor eax, esp
mov dword [esp + 0x420], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x56b1dc]
xor eax, esp
push eax
lea eax, [esp + 0x438]
mov dword fs:[0], eax
lea edi, [esp + 0x448]
mov dword [esp + 0x440], 0
call fcn.0041ef50
mov esi, dword [0x5314c8]
push 0
or ebx, 0xffffffff
push 0
mov dword [esp + 0x20], ebx
call esi
mov edi, eax
test edi, edi
mov dword [esp + 0x20], edi
jle 0x41dcdf
xor ecx, ecx
mov edx, 4
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.005002a8
mov ebp, eax
add esp, 4
test ebp, ebp
je 0x41dcdf
push ebp
push edi
call esi
test eax, eax
jne 0x41dd0f
push ebp
call fcn.00500319
add esp, 4
mov dword [esp + 0x440], ebx
mov eax, dword [esp + 0x448]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
mov edx, ebx
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41dd08
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, ebx
jmp 0x41deff
xor esi, esi
push 0x206
lea ecx, [esp + 0x2a]
push esi
push ecx
mov word [esp + 0x30], si
call fcn.00508d80
push 0x206
lea edx, [esp + 0x23e]
push esi
push edx
mov word [esp + 0x244], si
call fcn.00508d80
mov eax, dword [0x5759e8]
mov edx, dword [eax + 0xc]
add esp, 0x18
mov ecx, 0x5759e8
call edx
add eax, 0x10
mov dword [esp + 0x14], eax
mov byte [esp + 0x440], 1
mov eax, dword [0x5759e8]
mov edx, dword [eax + 0xc]
mov ecx, 0x5759e8
call edx
add eax, 0x10
mov dword [esp + 0x1c], eax
test edi, edi
mov byte [esp + 0x440], 2
jle 0x41de7d
push 0x208
lea eax, [esp + 0x28]
push 0
push eax
call fcn.00508d80
push 0x208
lea ecx, [esp + 0x23c]
push 0
push ecx
call fcn.00508d80
mov edx, dword [ebp + esi*4]
add esp, 0x18
push edx
call fcn.005209ce
test eax, eax
je 0x41de68
mov ecx, dword [ebp + esi*4]
push 0x104
lea eax, [esp + 0x28]
push eax
push ecx
call fcn.005209d4
mov eax, dword [ebp + esi*4]
push 0x104
lea edx, [esp + 0x230]
push edx
push eax
call fcn.005209da
lea eax, [esp + 0x24]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x41ddf4
sub eax, edx
sar eax, 1
lea ecx, [esp + 0x24]
mov ebx, eax
push ecx
lea eax, [esp + 0x18]
call fcn.004026c0
lea eax, [esp + 0x22c]
lea edx, [eax + 2]
lea ecx, [ecx]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x41de20
sub eax, edx
sar eax, 1
lea edx, [esp + 0x22c]
mov ebx, eax
push edx
lea eax, [esp + 0x20]
call fcn.004026c0
lea edi, [esp + 0x14]
call fcn.0041ef50
lea eax, [esp + 0x448]
push eax
mov eax, edi
call fcn.0040d3e0
add esp, 4
or ebx, 0xffffffff
test al, al
jne 0x41de75
mov edi, dword [esp + 0x20]
add esi, 1
cmp esi, edi
jl 0x41dd88
jmp 0x41de7d
mov ecx, dword [ebp + esi*4]
mov dword [esp + 0x18], ecx
push ebp
call fcn.00500319
mov byte [esp + 0x444], 1
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
add esp, 4
lea edx, [eax + 0xc]
mov ecx, ebx
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x41dead
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x440], 0
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
mov edx, ebx
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41ded4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x440], ebx
mov eax, dword [esp + 0x448]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
lock xadd dword [ecx], ebx
dec ebx
test ebx, ebx
jg 0x41defb
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x438]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x420]
xor ecx, esp
call fcn.004ff939
add esp, 0x430
ret