Function at 0x4338e0
Capabilities:
Get keyboard layout

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x8558
call fcn.004d5830
mov eax, dword [0x51ae08]
push ebx
xor ebx, ebx
push esi
push edi
mov dword [ebp - 0x24], eax
cmp eax, ebx
jne 0x43392f
cmp dword [0x51c0b8], 1
mov edx, dword [ebp + 8]
sete al
test al, al
sete al
movzx ecx, al
push ecx
push edx
mov dword [0x51c0b8], ebx
call fcn.0042db70
lea esp, [ebp - 0x8564]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov eax, dword [0x51ae64]
mov edi, dword [0x51ae5c]
mov esi, dword [0x51ae60]
mov dword [ebp - 0x20], eax
mov dword [0x51c0b8], ebx
mov dword [0x51c0e4], 1
mov word [0x51c0e8], bx
mov dword [0x51c0f4], 0x3fff
movzx eax, word [edi]
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x18], ebx
mov byte [ebp - 6], bl
cmp ax, bx
je 0x433a44
lea ebx, [edi + 2]
lea esp, [esp]
movzx esi, ax
test esi, 0xffffff80
jne 0x43399d
push 2
push esi
call fcn.004cae3e
add esp, 8
test eax, eax
je 0x43399d
and esi, 0xffffffdf
movzx eax, si
add eax, 0xffffffd6
cmp eax, 0x2c
ja case.0x4339b3.43
movzx ecx, byte [eax + 0x434284]
jmp dword [ecx*4 + 0x43425c]
mov byte [0x51c0e4], 0
jmp case.0x4339b3.43
mov byte [0x51c0e5], 1
jmp case.0x4339b3.43
mov byte [0x51c0e6], 1
jmp case.0x4339b3.43
mov byte [0x51c0e7], 1
jmp case.0x4339b3.43
push ebx
call fcn.004cae86
add esp, 4
mov dword [0x51c0f4], eax
cmp eax, 0x3fff
jle case.0x4339b3.43
mov dword [0x51c0f4], 0x3fff
jmp case.0x4339b3.43
mov esi, ebx
call fcn.0041ac70
fmul qword [0x50f870]
call fcn.004d8ac0
mov dword [ebp - 0x18], eax
jmp case.0x4339b3.43
mov byte [0x51c0e8], 1
jmp case.0x4339b3.43
mov byte [0x51c0e9], 1
jmp case.0x4339b3.43
mov byte [ebp - 6], 1
movzx eax, word [edi + 2]
add edi, 2
add ebx, 2
test ax, ax
jne 0x433980
mov esi, dword [ebp - 0x1c]
xor ebx, ebx
push 0xff
lea edx, [ebp - 0x353]
push ebx
push edx
mov byte [ebp - 0x354], 0
call fcn.004d2f90
add esp, 0xc
push 0x1ff
lea eax, [ebp - 0x553]
push ebx
push eax
mov byte [ebp - 0x554], 0
call fcn.004d2f90
xor ecx, ecx
add esp, 0xc
mov word [ebp - 0xa], cx
mov dword [ebp - 0x14], ebx
mov eax, esi
mov dword [ebp - 0x10], esi
cmp word [esi], bx
je 0x433bc4
xor edx, edx
mov word [ebp - 0xc], dx
movzx ecx, word [eax]
mov eax, ecx
sub eax, 0x7b
je 0x433ae1
sub eax, 2
je 0x433bb1
cmp byte [ebp - 6], dl
je 0x433ab9
inc dword [ebp - 0x14]
jmp 0x433bb1
push 0
mov word [ebp - 0xc], cx
mov byte [ebp - 5], dl
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
push eax
lea eax, [ebp - 5]
push 1
push eax
lea eax, [ebp - 0xc]
call fcn.00413290
add esp, 0xc
mov bl, al
jmp 0x433b78
mov edi, dword [ebp - 0x10]
add edi, 2
push 0x7d
push edi
call fcn.004ca9cb
mov esi, eax
add esp, 8
test esi, esi
je 0x433bb1
sub eax, dword [ebp - 0x10]
sar eax, 1
dec eax
jne 0x433b14
cmp word [esi + 2], 0x7d
jne 0x433bb1
add esi, 2
jmp 0x433b19
cmp eax, 1
jne 0x433b2e
cmp byte [ebp - 6], 0
je 0x433b27
inc dword [ebp - 0x14]
jmp 0x433bb1
mov cx, word [edi]
mov word [ebp - 0xc], cx
xor edx, edx
push edx
mov word [esi], dx
mov byte [ebp - 5], dl
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
push eax
lea eax, [ebp - 5]
push 1
push eax
mov eax, edi
call fcn.00413290
mov bl, al
add esp, 0xc
test bl, bl
jne 0x433b6d
mov eax, edi
call fcn.004131e0
movzx eax, ax
test ax, ax
je 0x433b6d
mov ecx, eax
mov byte [ebp + ecx - 0x554], 1
mov edx, 0x7d
mov word [esi], dx
mov dword [ebp - 0x10], esi
test bl, bl
je 0x433bb1
movzx esi, bl
or byte [ebp + esi - 0x354], 1
cmp word [ebp - 0xc], 0
lea esi, [ebp + esi - 0x354]
je 0x433bb1
mov eax, dword [ebp - 0xc]
push eax
call dword [sym.imp.USER32.dll_IsCharAlphaW]
test eax, eax
jne 0x433bb1
test byte [ebp - 5], 0x30
je 0x433bae
or byte [esi], 2
jmp 0x433bb1
or byte [esi], 4
mov eax, dword [ebp - 0x10]
add eax, 2
cmp word [eax], 0
mov dword [ebp - 0x10], eax
jne 0x433a93
mov eax, dword [ebp - 0x14]
mov dword [0x51c0c4], 0x4f5ac4
test eax, eax
je 0x433c47
lea eax, [eax + eax + 2]
call fcn.004d1650
mov esi, dword [ebp - 0x1c]
mov eax, esp
mov dword [0x51c0c4], eax
cmp word [esi], 0
mov ebx, eax
je 0x433c42
movzx ecx, word [esi]
mov eax, ecx
sub eax, 0x7b
je 0x433c07
sub eax, 2
je 0x433c39
mov word [ebx], cx
add ebx, 2
jmp 0x433c39
lea edi, [esi + 2]
push 0x7d
push edi
call fcn.004ca9cb
add esp, 8
test eax, eax
je 0x433c39
cmp eax, edi
jne 0x433c27
cmp word [eax + 2], 0x7d
jne 0x433c27
add eax, 2
add esi, 4
cmp eax, esi
jne 0x433c37
mov cx, word [edi]
mov word [ebx], cx
add ebx, 2
mov esi, eax
add esi, 2
cmp word [esi], 0
jne 0x433bf0
xor edx, edx
mov word [ebx], dx
mov eax, dword [ebp - 0x20]
mov dword [0x51c0d4], 0
cmp word [eax], 0
je 0x433e94
cmp dword [0x51c0d0], 0
jne 0x433caa
push 0x1000
call fcn.004c9c38
add esp, 4
mov dword [0x51c0d0], eax
test eax, eax
jne 0x433ca0
mov ecx, dword [ebp + 8]
push 0x4f5ac4
push 0
push str.Out_of_memory.
call fcn.0042dd40
lea esp, [ebp - 0x8564]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov dword [0x51c0d8], 0x400
mov esi, dword [ebp + 8]
cmp byte [esi + 2], 3
ja 0x433cba
xor eax, eax
jmp 0x433d36
mov eax, dword [0x51ae14]
test eax, eax
je 0x433d1f
mov cl, byte [eax + 0x17]
test cl, cl
jne 0x433cd2
mov edx, dword [eax + 0xc]
mov dl, byte [edx + 0x17]
jmp 0x433cd4
mov dl, cl
cmp dl, 1
jne 0x433d1f
movzx edx, word [esi]
imul edx, edx, 0x15
test byte [edx + 0x5168a6], 0x80
jne 0x433d1f
cmp dword [0x51b038], 0
jne 0x433d10
test cl, cl
jne 0x433cfa
mov ecx, dword [eax + 0xc]
jmp 0x433cfc
mov ecx, eax
test byte [ecx + 0x15], 0xa
jne 0x433d10
xor edx, edx
cmp dword [ecx + 0xc], edx
setne dl
mov ecx, edx
test ecx, ecx
je 0x433d1f
cmp eax, dword [0x51b6d0]
je 0x433d1f
call fcn.0041b150
jmp 0x433d36
mov eax, dword [0x51ae64]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x433d27
sub eax, edx
sar eax, 1
inc eax
cmp eax, dword [0x51c0e0]
jbe 0x433da7
mov dword [0x51c0e0], eax
cmp eax, 0x1000
ja 0x433d55
mov dword [0x51c0e0], 0x1000
mov eax, dword [0x51c0dc]
test eax, eax
je 0x433d67
push eax
call fcn.004ca991
add esp, 4
mov eax, dword [0x51c0e0]
lea ecx, [eax + eax]
push ecx
call fcn.004c9c38
add esp, 4
mov dword [0x51c0dc], eax
test eax, eax
jne 0x433dac
push 0x4f5ac4
push eax
push str.Out_of_memory.
mov ecx, esi
mov dword [0x51c0e0], eax
call fcn.0042dd40
lea esp, [ebp - 0x8564]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov eax, dword [0x51c0dc]
mov edx, dword [0x51c0d0]
mov ecx, dword [0x51c0d4]
mov edi, dword [ebp - 0x20]
mov dword [edx + ecx*4], eax
cmp word [edi], 0
mov esi, dword [0x51c0dc]
je 0x433e74
mov ebx, 0x2c
movzx eax, word [edi]
cmp ax, bx
je 0x433de6
mov word [esi], ax
add esi, 2
jmp 0x433e67
cmp word [edi + 2], bx
jne 0x433df9
mov edx, ebx
mov word [esi], dx
add esi, 2
add edi, 2
jmp 0x433e67
xor eax, eax
mov word [esi], ax
mov ecx, dword [0x51c0d0]
mov eax, dword [0x51c0d4]
mov edx, dword [ecx + eax*4]
cmp word [edx], 0
je 0x433e2e
inc eax
mov dword [0x51c0d4], eax
add esi, 2
mov dword [ecx + eax*4], esi
xor eax, eax
mov word [esi], ax
mov eax, dword [0x51c0d4]
mov ecx, dword [0x51c0d0]
cmp word [edi + 2], 0
je 0x433e67
mov edx, dword [0x51c0d8]
cmp eax, edx
jb 0x433e67
lea edx, [edx*4 + 0x1000]
push edx
push ecx
call fcn.004caea7
add esp, 8
test eax, eax
je 0x433c7d
add dword [0x51c0d8], 0x400
mov dword [0x51c0d0], eax
add edi, 2
cmp word [edi], 0
jne 0x433dd3
xor eax, eax
mov word [esi], ax
mov ecx, dword [0x51c0d0]
mov edx, dword [0x51c0d4]
mov eax, dword [ecx + edx*4]
cmp word [eax], 0
je 0x433e94
inc dword [0x51c0d4]
cmp byte [0x51b029], 0
je 0x433ed2
mov ecx, dword [0x51aed0]
push 0xc
push ecx
call dword [sym.imp.USER32.dll_KillTimer]
test eax, eax
je 0x433eb7
mov byte [0x51b029], 0
push 0x10
call dword [sym.imp.USER32.dll_GetQueueStatus]
shr eax, 0x10
test al, 0x10
je 0x433ed2
push 1
push 0xffffffffffffffff
call fcn.00401930
add esp, 8
or byte [0x51b8e2], 1
xor edx, edx
cmp dword [0x51b000], 0
mov word [ebp - 0x8554], dx
mov dword [0x51c0f0], edx
lea eax, [ebp - 0x8554]
lea ecx, [ebp - 0x354]
lea edx, [ebp - 0x554]
mov dword [0x51c0ec], eax
mov dword [0x51c0bc], ecx
mov dword [0x51c0c0], edx
mov dword [0x51c0b8], 1
mov byte [0x51b024], 1
jne 0x433f36
mov eax, dword [0x516610]
movzx ecx, word [eax]
push ecx
call fcn.00408500
add esp, 4
mov eax, dword [ebp - 0x18]
test eax, eax
jle 0x433f70
cmp byte [0x51b029], 0
jne 0x433f70
cmp eax, 0xa
jge 0x433f50
mov eax, 0xa
mov edx, dword [0x51aed0]
push 0x403e40
push eax
push 0xc
push edx
call dword [sym.imp.USER32.dll_SetTimer]
test eax, eax
setne al
mov byte [0x51b029], al
nop
push 1
push 0x8000012f
call fcn.00401930
mov eax, dword [0x51c0b8]
add esp, 8
cmp eax, 1
je 0x433f70
add eax, 0xfffffffe
cmp eax, 3
ja case.default.0x433f95
jmp dword [eax*4 + 0x4342b4]
push 0x4f36e0
call fcn.004a4b10
mov ecx, dword [0x51b6d0]
add esp, 4
push 1
push 0
push 0xffffffffffffffff
push eax
push ecx
jmp 0x4341e9
push 0x4f3700
call fcn.004a4b10
mov edx, dword [0x51b6d0]
add esp, 4
push 1
push 0
push 0xffffffffffffffff
push eax
push edx
jmp 0x4341e9
mov ecx, dword [0x4f3720]
mov eax, dword [str.EndKey:]
mov edx, dword [0x4f3724]
push 0xf0
mov dword [ebp - 0x120], ecx
mov dword [ebp - 0x124], eax
mov eax, dword [0x4f3728]
lea ecx, [ebp - 0x114]
push 0
push ecx
mov dword [ebp - 0x11c], edx
mov dword [ebp - 0x118], eax
call fcn.004d2f90
mov ax, word [0x51c0cc]
add esp, 0xc
test ax, ax
je 0x434040
xor edx, edx
mov word [ebp - 0x116], ax
mov word [ebp - 0x114], dx
jmp 0x4341af
cmp byte [0x51c0cf], 0
je 0x43410d
push 0xff
lea eax, [ebp - 0x253]
push 0
push eax
mov byte [ebp - 0x254], 0
call fcn.004d2f90
or byte [ebp - 0x244], 0x80
add esp, 0xc
call dword [sym.imp.USER32.dll_GetForegroundWindow]
xor esi, esi
test eax, eax
je 0x4340b6
mov edi, dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
push esi
push eax
call edi
lea ecx, [ebp - 0x154]
mov esi, eax
push ecx
push esi
mov dword [ebp - 0x154], 0x30
call dword [sym.imp.USER32.dll_GetGUIThreadInfo]
test eax, eax
je 0x4340b6
mov eax, dword [ebp - 0x148]
test eax, eax
je 0x4340b6
push 0
push eax
call edi
mov esi, eax
push esi
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
xor edx, edx
cmp dword [0x51b060], edx
push eax
setne dl
lea eax, [ebp - 0x116]
lea ecx, [ebp - 0x254]
xor bl, bl
push edx
movzx edx, byte [0x51c0c8]
push 2
push eax
push ecx
push edx
call fcn.00413870
movzx ecx, byte [0x51c0c8]
movzx eax, ax
add esp, 4
push eax
push ecx
call dword [sym.imp.USER32.dll_ToUnicodeEx]
xor edx, edx
mov word [ebp + eax*2 - 0x116], dx
jmp 0x4341af
cmp byte [0x51c0ce], 0
je 0x43416f
mov cx, word [0x51c0ca]
xor eax, eax
nop
cmp word [eax*8 + 0x51d11c], cx
je 0x43414e
inc eax
cmp eax, 0xd
jl 0x434120
movzx eax, cx
push eax
push str.sc_03X
mov esi, 0x79
lea edi, [ebp - 0x116]
call fcn.004ac070
add esp, 8
jmp 0x43418a
mov eax, dword [eax*8 + 0x51d118]
push 0x78
push eax
lea ecx, [ebp - 0x116]
push ecx
call fcn.004cb3f1
add esp, 0xc
xor edx, edx
mov word [ebp - 0x26], dx
jmp 0x43418a
mov bl, byte [0x51c0c8]
push 1
mov eax, 0x79
lea ecx, [ebp - 0x116]
call fcn.00413030
add esp, 4
mov ecx, dword [ebp - 0x116]
add ecx, 0xffffff9f
cmp cx, 0x19
ja 0x4341af
cmp word [ebp - 0x114], 0
jne 0x4341af
mov edx, 0xffe0
add word [ebp - 0x116], dx
mov ecx, dword [0x51b6d0]
push 1
push 0
push 0xffffffffffffffff
lea eax, [ebp - 0x124]
push eax
push ecx
jmp 0x4341e9
push 0x4f372c
jmp 0x433fc1
push 0x4f3744
call fcn.004a4b10
add esp, 4
push 1
push 0
push 0xffffffffffffffff
push eax
mov eax, dword [0x51b6d0]
push eax
call fcn.004aefb0
cmp byte [0x51b029], 0
mov dword [0x51c0b8], 0
je 0x434236
mov ecx, dword [0x51aed0]
push 0xc
push ecx
call dword [sym.imp.USER32.dll_KillTimer]
test eax, eax
je 0x43421b
mov byte [0x51b029], 0
push 0x10
call dword [sym.imp.USER32.dll_GetQueueStatus]
shr eax, 0x10
test al, 0x10
je 0x434236
push 1
push 0xffffffffffffffff
call fcn.00401930
add esp, 8
mov eax, dword [ebp - 0x24]
push 1
push 0
push 0xffffffffffffffff
lea edx, [ebp - 0x8554]
push edx
push eax
call fcn.004aefb0
lea esp, [ebp - 0x8564]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4