Function at 0x435200
Capabilities:
Get keyboard layout

Disassembly:
sub esp, 0x14
push ebx
push ebp
xor eax, eax
mov edx, ecx
push esi
mov word [esp + 0x16], ax
xor esi, esi
mov al, byte [esp + 0x28]
push edi
xor edi, edi
mov dword [esp + 0x20], edx
mov dword [esp + 0x14], esi
mov dword [esp + 0x1c], edi
test al, al
je 0x435233
cmp byte [edx + 0x44], 0
mov byte [esp + 0x12], 1
jne 0x435238
mov byte [esp + 0x12], 0
mov ebx, dword [esp + 0x28]
mov ebp, ebx
cmp word [ebx], si
je 0x435594
mov ebx, ecx
nop dword [eax]
xor eax, eax
mov word [esp + 0x18], ax
movzx ecx, word [ebp]
mov eax, ecx
sub eax, 0x7b
je 0x4352a6
sub eax, 2
je 0x4352de
cmp byte [esp + 0x12], 0
je 0x435275
inc edi
mov dword [esp + 0x1c], edi
jmp 0x4352de
push 0
mov word [esp + 0x1c], cx
mov byte [esp + 0x15], 0
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
push eax
push ecx
push 1
lea edx, [esp + 0x1d]
lea ecx, [esp + 0x24]
call fcn.00414160
mov dh, al
add esp, 0xc
mov byte [esp + 0x10], dh
jmp 0x43546d
lea esi, [ebp + 2]
push 0x7d
push esi
call fcn.00496bcf
mov edi, eax
add esp, 8
test edi, edi
je 0x4352d6
mov ecx, edi
sub ecx, ebp
sar ecx, 1
sub ecx, 1
jne 0x435353
add edi, 2
cmp word [edi], 0x7d
je 0x435358
mov edi, dword [esp + 0x1c]
mov esi, dword [esp + 0x14]
add ebp, 2
cmp word [ebp], 0
jne 0x435250
mov ebx, dword [esp + 0x28]
mov edx, dword [esp + 0x20]
test edi, edi
je 0x435590
mov eax, dword [edx + 0x1c]
cmp edi, eax
jbe 0x435519
test eax, eax
je 0x435316
push dword [edx + 0x18]
call fcn.0049b8d4
add esp, 4
lea eax, [edi*2 + 2]
push eax
call fcn.004997ae
mov edx, dword [esp + 0x24]
add esp, 4
mov dword [edx + 0x18], eax
test eax, eax
jne 0x435516
push 0x4b70dc
push str.Out_of_memory.
mov ecx, 0x4ddca0
call fcn.004302e0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret 0x10
cmp ecx, 1
jne 0x435375
cmp byte [esp + 0x12], 0
je 0x43536d
mov edi, dword [esp + 0x1c]
inc edi
mov dword [esp + 0x1c], edi
jmp 0x4352da
mov ax, word [esi]
mov word [esp + 0x18], ax
xor eax, eax
push eax
mov word [edi], ax
mov byte [esp + 0x15], al
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
push eax
push ecx
push 1
lea edx, [esp + 0x1d]
mov ecx, esi
call fcn.00414160
add esp, 0xc
mov byte [esp + 0x10], al
test al, al
je 0x435447
movzx eax, word [esi]
mov esi, eax
test eax, 0xffffff80
je 0x4353b3
xor eax, eax
jmp 0x4353be
push 2
push eax
call fcn.0049bd84
add esp, 8
mov ecx, esi
and ecx, 0xffdf
test eax, eax
movzx edx, cx
mov ecx, esi
cmove edx, ecx
cmp dx, 0x56
jne 0x43540e
movzx eax, word [ebp + 4]
mov esi, eax
test eax, 0xffffff80
je 0x4353e7
xor eax, eax
jmp 0x4353f2
push 2
push eax
call fcn.0049bd84
add esp, 8
mov ecx, esi
and ecx, 0xffdf
test eax, eax
movzx edx, cx
mov ecx, esi
cmove edx, ecx
cmp dx, 0x4b
jne 0x43540e
mov al, 1
jmp 0x435410
xor al, al
cmp dword [ebx + 8], 0
mov byte [esp + 0x13], al
je 0x435457
test al, al
jne 0x435457
mov cl, byte [esp + 0x10]
mov dl, 1
call fcn.00414720
movzx esi, ax
mov dword [esp + 0x14], esi
test si, si
je 0x43545b
xor esi, 0x100
xor dh, dh
mov dword [esp + 0x14], esi
mov byte [esp + 0x10], dh
jmp 0x43545f
mov ecx, esi
call fcn.00414080
movzx esi, ax
mov dword [esp + 0x14], esi
jmp 0x43545b
mov esi, dword [esp + 0x14]
mov dh, byte [esp + 0x10]
mov eax, 0x7d
mov ebp, edi
mov word [edi], ax
mov edi, dword [esp + 0x1c]
test dh, dh
je 0x4354eb
cmp word [esp + 0x18], 0
je 0x4354a9
cmp byte [esp + 0x2c], 0
je 0x4354a9
push dword [esp + 0x18]
call dword [sym.imp.USER32.dll_IsCharAlphaW]
test eax, eax
jne 0x4354a5
mov al, byte [esp + 0x11]
movzx ecx, byte [esp + 0x10]
and al, 0x30
neg al
sbb al, al
add al, 2
or byte [ecx + ebx + 0x54], al
jmp 0x4354eb
mov dh, byte [esp + 0x10]
mov dl, byte [esp + 0x30]
movzx ecx, dh
mov al, dl
not al
mov byte [esp + 0x11], al
and al, byte [ecx + ebx + 0x54]
or al, byte [esp + 0x34]
mov byte [ecx + ebx + 0x54], al
test dl, dl
je 0x4354ef
cmp byte [esp + 0x13], 0
jne 0x4354ef
xor dl, dl
mov cl, dh
call fcn.00414720
movzx eax, ax
test ax, ax
je 0x4354eb
mov cl, byte [esp + 0x11]
and byte [eax + ebx + 0x154], cl
mov dl, byte [esp + 0x30]
test si, si
je 0x4352de
movzx ecx, si
mov al, dl
not al
and al, byte [ecx + ebx + 0x154]
or al, byte [esp + 0x34]
mov byte [ecx + ebx + 0x154], al
jmp 0x4352de
mov dword [edx + 0x1c], edi
movzx eax, word [ebx]
mov esi, dword [edx + 0x18]
test ax, ax
je 0x43557c
mov ecx, eax
movzx eax, cx
sub eax, 0x7b
je 0x43553b
sub eax, 2
je 0x43556e
mov word [esi], cx
add esi, 2
jmp 0x43556e
lea edi, [ebx + 2]
push 0x7d
push edi
call fcn.00496bcf
add esp, 8
test eax, eax
je 0x43556e
cmp eax, edi
jne 0x43555c
cmp word [eax + 2], 0x7d
lea ecx, [eax + 2]
cmove eax, ecx
lea ecx, [ebx + 4]
cmp eax, ecx
jne 0x43556c
mov cx, word [edi]
mov word [esi], cx
add esi, 2
mov ebx, eax
movzx eax, word [ebx + 2]
add ebx, 2
mov ecx, eax
test ax, ax
jne 0x435526
xor eax, eax
pop edi
mov word [esi], ax
mov eax, 1
pop esi
pop ebp
pop ebx
add esp, 0x14
ret 0x10
mov al, byte [esp + 0x2c]
test al, al
je 0x4355ba
cmp dword [edx + 0x1c], 0
je 0x4355b3
mov eax, dword [edx + 0x18]
xor ecx, ecx
pop edi
pop esi
pop ebp
mov word [eax], cx
lea eax, [ecx + 1]
pop ebx
add esp, 0x14
ret 0x10
mov dword [edx + 0x18], 0x4b70dc
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x14
ret 0x10