Function at 0x402f30
Capabilities:
Access peb ldr_data
Get keyboard layout

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0x1b0
mov esi, esp
mov dword [esi + 0x198], ebp
mov dword [esi + 0x19c], esp
mov dword [esi + 0x1a8], 0xffffffff
mov dword [esi + 0x1a4], 0x4031b0
mov edi, edx
mov dword [esi], ecx
mov eax, dword fs:[0]
mov dword [esi + 0x1a0], eax
lea eax, [esi + 0x1a0]
mov dword fs:[0], eax
call sub.USER32.dll_GetForegroundWindow
push 0
push eax
call sub.USER32.dll_GetWindowThreadProcessId
xorps xmm0, xmm0
lea ebx, [edi + 8]
movaps xmmword [esi + 0x40], xmm0
movaps xmmword [esi + 0x30], xmm0
movaps xmmword [esi + 0x20], xmm0
movaps xmmword [esi + 0x10], xmm0
push eax
call sub.USER32.dll_GetKeyboardLayout
lea ecx, [esi + 0x10]
mov dword [esi + 8], eax
push eax
push 0
push 7
push ecx
mov dword [esi + 0xc], ebx
push ebx
mov ebx, dword [ebp + 8]
push dword [ebp + 0xc]
push ebx
call sub.USER32.dll_ToUnicodeEx
cmp eax, 0xffffffff
je 0x402feb
test eax, eax
jne 0x4030ba
mov eax, dword [esi]
mov edx, dword [ebp + 0xc]
mov dword [eax], 0
xor eax, eax
mov ecx, dword [edi]
test ecx, ecx
jne 0x40310f
jmp 0x40315b
mov ebx, dword [esi + 8]
xorps xmm0, xmm0
mov dword [esi + 4], edi
lea edi, [esi + 0x50]
movaps xmmword [esi + 0x180], xmm0
movaps xmmword [esi + 0x170], xmm0
movaps xmmword [esi + 0x160], xmm0
movaps xmmword [esi + 0x150], xmm0
movaps xmmword [esi + 0x140], xmm0
movaps xmmword [esi + 0x130], xmm0
movaps xmmword [esi + 0x120], xmm0
movaps xmmword [esi + 0x110], xmm0
movaps xmmword [esi + 0x100], xmm0
movaps xmmword [esi + 0xf0], xmm0
movaps xmmword [esi + 0xe0], xmm0
movaps xmmword [esi + 0xd0], xmm0
movaps xmmword [esi + 0xc0], xmm0
movaps xmmword [esi + 0xb0], xmm0
movaps xmmword [esi + 0xa0], xmm0
movaps xmmword [esi + 0x90], xmm0
movaps xmmword [esi + 0x80], xmm0
movaps xmmword [esi + 0x70], xmm0
movaps xmmword [esi + 0x60], xmm0
movaps xmmword [esi + 0x50], xmm0
nop word [eax + eax]
push ebx
push 0
push 0x20
lea eax, [esi + 0x150]
push eax
push edi
push dword [ebp + 0xc]
push dword [ebp + 8]
call sub.USER32.dll_ToUnicodeEx
test eax, eax
js 0x403080
mov eax, dword [esi]
mov edi, dword [esi + 4]
mov edx, dword [ebp + 0xc]
mov ebx, dword [ebp + 8]
mov dword [eax], 0
mov al, 1
mov ecx, dword [edi]
test ecx, ecx
jne 0x40310f
jmp 0x40315b
mov edx, dword [ebp + 0xc]
jle 0x4030f2
cmp eax, 0x21
jae 0x40317a
lea ecx, [esi + 0x50]
push eax
lea eax, [esi + 0x10]
push eax
push ecx
call fcn.00417db0
add esp, 0xc
cmp dword [esi + 0x50], 0
je 0x4030fc
mov eax, dword [esi + 0x58]
mov ecx, dword [esi]
movsd xmm0, qword [esi + 0x50]
mov dword [ecx + 8], eax
movsd qword [ecx], xmm0
jmp 0x403104
mov eax, dword [esi]
mov dword [eax], 0
jmp 0x403107
mov eax, dword [esi]
mov dword [eax], 0
mov edx, dword [ebp + 0xc]
xor eax, eax
mov ecx, dword [edi]
test ecx, ecx
je 0x40315b
cmp byte [edi + 0x108], 0
je 0x40315b
mov eax, dword [edi + 4]
xorps xmm0, xmm0
mov dword [esi + 0x1a8], 0
movaps xmmword [esi + 0x40], xmm0
movaps xmmword [esi + 0x30], xmm0
movaps xmmword [esi + 0x20], xmm0
movaps xmmword [esi + 0x10], xmm0
push dword [esi + 8]
push 0
push 0x20
lea edx, [esi + 0x10]
push edx
push dword [esi + 0xc]
push eax
push ecx
mov dword [esi + 4], edi
call sub.USER32.dll_ToUnicodeEx
mov eax, dword [esi + 4]
mov dword [eax], 0
jmp 0x403166
mov dword [edi], ebx
mov dword [edi + 4], edx
mov byte [edi + 0x108], al
mov eax, dword [esi + 0x1a0]
mov dword fs:[0], eax
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
push 0x41e470
push 0x20
push eax
call fcn.0041d880
add esp, 0xc
ud2