Function at 0x512a30
Capabilities:
Log keystrokes via polling

Disassembly:
sub esp, 0x10
push esi
mov esi, dword [ebx + 0x34]
cmp esi, 0xffffffff
jne 0x512a45
xor eax, eax
pop esi
add esp, 0x10
ret 0x1c
mov eax, dword [ebx + 0xa4]
xor ecx, ecx
test eax, eax
push edi
jbe 0x512a75
mov edx, dword [ebx + 0xb8]
mov eax, dword [edx]
cmp eax, esi
jb 0x512a67
cmp eax, dword [ebx + 0x38]
jbe 0x512b0a
mov eax, dword [ebx + 0xa4]
inc ecx
add edx, 4
cmp ecx, eax
jb 0x512a58
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x28]
push ebp
mov ebp, dword [esp + 0x20]
sub ebp, edx
sub eax, ecx
test esi, esi
mov dword [esp + 0xc], ebp
mov dword [esp + 0x14], eax
je 0x512aa4
mov eax, dword [ebx + 0xa0]
mov ecx, dword [ebx + 0x38]
dec eax
cmp ecx, eax
jne 0x512aaa
xor ebp, ebp
mov dword [esp + 0xc], ebp
mov eax, dword [ebx + 0x5c]
test eax, eax
je 0x512ac4
push 0x11
call dword [sym.imp.USER32.dll_GetAsyncKeyState]
test ax, ax
jl 0x512ac4
xor ebp, ebp
mov dword [esp + 0xc], ebp
mov eax, dword [ebx + 0xa4]
or edi, 0xffffffff
or esi, 0xffffffff
test eax, eax
mov dword [esp + 0x28], edi
mov dword [esp + 0x10], esi
jbe 0x512b3a
mov ecx, dword [ebx + 0xb4]
mov edx, dword [ebx + 0xb8]
mov dword [esp + 0x28], eax
lea esp, [esp]
cmp edi, 0xffffffff
mov esi, dword [edx]
mov eax, dword [ecx + esi*8]
mov esi, dword [ecx + esi*8 + 4]
mov dword [esp + 0x24], esi
jne 0x512b14
mov esi, eax
mov dword [esp + 0x10], esi
jmp 0x512b26
pop edi
xor eax, eax
pop esi
add esp, 0x10
ret 0x1c
mov esi, dword [esp + 0x10]
cmp eax, esi
jle 0x512b22
mov esi, eax
mov dword [esp + 0x10], esi
cmp eax, edi
jge 0x512b28
mov edi, eax
mov eax, dword [esp + 0x28]
add edx, 4
dec eax
mov dword [esp + 0x28], eax
jne 0x512af0
mov dword [esp + 0x28], edi
mov eax, dword [ebx + 0xa0]
cmp dword [ebx + 0x98], eax
jne 0x512bbf
mov ecx, dword [ebx + 0x34]
test ecx, ecx
jle 0x512b82
cmp edi, 0xffffffff
mov edx, dword [ebx + 0xb4]
mov eax, dword [edx + ecx*8 - 8]
mov ecx, dword [edx + ecx*8 - 4]
mov dword [esp + 0x24], ecx
jne 0x512b6e
mov esi, eax
mov dword [esp + 0x10], esi
jmp 0x512b7c
cmp eax, esi
jle 0x512b78
mov esi, eax
mov dword [esp + 0x10], esi
cmp eax, edi
jge 0x512b82
mov edi, eax
mov dword [esp + 0x28], edi
mov eax, dword [ebx + 0xa0]
mov ecx, dword [ebx + 0x38]
dec eax
cmp ecx, eax
jge 0x512bbf
cmp edi, 0xffffffff
mov edx, dword [ebx + 0xb4]
mov eax, dword [edx + ecx*8 + 8]
mov ecx, dword [edx + ecx*8 + 0xc]
mov dword [esp + 0x24], ecx
jne 0x512bad
mov dword [esp + 0x10], eax
jmp 0x512bb9
cmp eax, esi
jle 0x512bb5
mov dword [esp + 0x10], eax
cmp eax, edi
jge 0x512bbf
mov edi, eax
mov dword [esp + 0x28], edi
mov ecx, dword [ebx + 0x34]
mov eax, dword [ebx + 0x38]
cmp ecx, eax
mov dword [esp + 0x20], ecx
ja 0x512cea
mov edx, dword [ebx + 0xb4]
mov eax, ecx
lea ecx, [edx + eax*8]
mov dword [esp + 0x18], ecx
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x14]
test edx, edx
mov ecx, dword [eax]
mov esi, dword [eax + 4]
je 0x512c1c
mov eax, dword [ebx + 0x8c]
lea edi, [esi + edx]
cmp edi, eax
jl 0x512c06
sub eax, esi
mov edx, eax
mov dword [esp + 0x14], edx
mov eax, dword [ebx + 0x88]
mov edi, dword [esp + 0x28]
add edx, esi
cmp edx, eax
jge 0x512c1c
sub eax, esi
mov dword [esp + 0x14], eax
test ebp, ebp
je 0x512c58
mov eax, dword [ebx + 0x18]
test eax, eax
lea edx, [ecx + ebp]
je 0x512c2f
mov eax, dword [ebx + 0x20]
jmp 0x512c35
mov eax, dword [ebx + 0x94]
cmp edx, eax
jl 0x512c42
sub eax, ecx
dec eax
mov ebp, eax
mov dword [esp + 0xc], ebp
mov eax, dword [ebx + 0x90]
lea edx, [ecx + ebp]
cmp edx, eax
jg 0x512c58
sub eax, ecx
inc eax
mov ebp, eax
mov dword [esp + 0xc], ebp
mov edx, dword [ebx + 0xac]
xor eax, eax
test edx, edx
jbe 0x512ccb
mov edi, dword [ebx + 0xbc]
mov ebp, dword [esp + 0x20]
mov edx, edi
cmp dword [edx], ebp
je 0x512c86
inc eax
add edx, 0x1c
cmp eax, dword [ebx + 0xac]
jb 0x512c70
mov ebp, dword [esp + 0xc]
jmp 0x512cc7
mov edx, dword [esp + 0x14]
imul eax, eax, 0x1c
mov ebp, dword [esp + 0xc]
add eax, edi
add esi, edx
mov edx, dword [eax + 8]
add ecx, ebp
test edx, edx
je 0x512cb0
cmp esi, dword [eax + 0xc]
jl 0x512ca8
cmp esi, dword [eax + 0x10]
jle 0x512cb0
mov dword [esp + 0x14], 0
mov edx, dword [eax + 4]
test edx, edx
je 0x512cc7
cmp ecx, dword [eax + 0x14]
jl 0x512cc1
cmp ecx, dword [eax + 0x18]
jle 0x512cc7
xor ebp, ebp
mov dword [esp + 0xc], ebp
mov edi, dword [esp + 0x28]
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x18]
mov ecx, dword [ebx + 0x38]
inc eax
add edx, 8
cmp eax, ecx
mov dword [esp + 0x20], eax
mov dword [esp + 0x18], edx
jbe 0x512be0
cmp edi, 0xffffffff
je 0x512d3b
test ebp, ebp
je 0x512d3f
mov edx, dword [ebx + 0xb4]
jle 0x512d1e
mov ecx, dword [ebx + 0x38]
mov eax, dword [edx + ecx*8]
mov ecx, dword [edx + ecx*8 + 4]
mov dword [esp + 0x24], ecx
mov ecx, dword [esp + 0x10]
lea edx, [eax + ebp]
cmp edx, ecx
jl 0x512d3b
cmp eax, ecx
jge 0x512d3b
sub ecx, eax
mov ebp, ecx
jmp 0x512d3b
mov ecx, dword [ebx + 0x34]
mov eax, dword [edx + ecx*8]
mov ecx, dword [edx + ecx*8 + 4]
lea edx, [eax + ebp]
cmp edx, edi
mov dword [esp + 0x24], ecx
jg 0x512d3b
cmp eax, edi
jle 0x512d3b
sub edi, eax
mov ebp, edi
test ebp, ebp
jne 0x512d52
mov edx, dword [esp + 0x14]
test edx, edx
jne 0x512d56
pop ebp
pop edi
xor eax, eax
pop esi
add esp, 0x10
ret 0x1c
mov edx, dword [esp + 0x14]
mov eax, dword [ebx + 0x34]
cmp eax, dword [ebx + 0x38]
ja 0x512d8a
mov edi, edi
mov ecx, dword [ebx + 0xb4]
mov esi, dword [ecx + eax*8]
lea ecx, [ecx + eax*8]
add esi, ebp
mov dword [ecx], esi
mov ecx, dword [ebx + 0xb4]
mov edi, dword [ecx + eax*8 + 4]
lea ecx, [ecx + eax*8 + 4]
add edi, edx
mov dword [ecx], edi
mov ecx, dword [ebx + 0x38]
inc eax
cmp eax, ecx
jbe 0x512d60
test ebp, ebp
je 0x512d98
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x38]
mov dword [ecx], eax
test edx, edx
je 0x512da7
mov edx, dword [esp + 0x34]
mov eax, dword [esp + 0x38]
mov dword [eax + 4], edx
test ebp, ebp
mov edi, 1
jge 0x512f09
cmp dword [ebx + 0x34], edi
mov dword [esp + 0x20], edi
jbe 0x51304a
mov eax, dword [ebx + 0xb4]
mov ecx, dword [ebx + 0x34]
mov edx, dword [eax + edi*8]
cmp edx, dword [eax + ecx*8]
lea ebp, [edi*8]
jl 0x512eeb
mov esi, dword [ebx + 0xac]
xor eax, eax
test esi, esi
jbe 0x512e3c
mov ecx, dword [ebx + 0xbc]
nop
cmp dword [ecx], edi
je 0x512e04
mov edx, dword [ebx + 0xac]
inc eax
add ecx, 0x1c
cmp eax, edx
jb 0x512df0
jmp 0x512e3c
dec esi
cmp eax, esi
mov edx, eax
jae 0x512e36
imul eax, eax, 0x1c
mov edi, edi
mov ecx, dword [ebx + 0xbc]
lea edi, [eax + ecx]
lea esi, [edi + 0x1c]
mov ecx, 7
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebx + 0xac]
inc edx
add eax, 0x1c
dec ecx
cmp edx, ecx
jb 0x512e10
mov edi, dword [esp + 0x20]
dec dword [ebx + 0xac]
mov edx, dword [ebx + 0xa0]
dec edx
cmp edi, edx
jae 0x512ed0
lea esi, [edi + 1]
mov edi, edi
mov eax, dword [ebx + 0xb4]
mov ecx, dword [eax + ebp + 8]
add eax, ebp
mov dword [eax], ecx
mov edx, dword [eax + 0xc]
mov dword [eax + 4], edx
mov ecx, dword [ebx + 0xa4]
xor eax, eax
test ecx, ecx
jbe 0x512e8d
mov edx, dword [ebx + 0xb8]
mov ecx, edx
cmp dword [ecx], esi
je 0x512e8a
inc eax
add ecx, 4
cmp eax, dword [ebx + 0xa4]
jb 0x512e78
jmp 0x512e8d
dec dword [edx + eax*4]
mov ecx, dword [ebx + 0xac]
xor eax, eax
test ecx, ecx
jbe 0x512ebe
mov edx, dword [ebx + 0xbc]
mov ecx, edx
cmp dword [ecx], esi
je 0x512eb3
inc eax
add ecx, 0x1c
cmp eax, dword [ebx + 0xac]
jb 0x512ea1
jmp 0x512ebe
imul eax, eax, 0x1c
mov ecx, dword [eax + edx]
add eax, edx
dec ecx
mov dword [eax], ecx
mov eax, dword [ebx + 0xa0]
add ebp, 8
inc esi
dec eax
lea ecx, [esi - 1]
cmp ecx, eax
jb 0x512e50
mov edx, dword [ebx + 0x34]
mov ecx, dword [ebx + 0x38]
mov eax, dword [ebx + 0xa0]
dec edx
dec ecx
dec eax
mov dword [ebx + 0x34], edx
mov dword [ebx + 0x38], ecx
mov dword [ebx + 0xa0], eax
mov eax, dword [ebx + 0x34]
inc edi
cmp edi, eax
mov dword [esp + 0x20], edi
jb 0x512dc1
pop ebp
pop edi
mov eax, 1
pop esi
add esp, 0x10
ret 0x1c
mov edi, dword [ebx + 0x38]
mov edx, dword [ebx + 0xa0]
inc edi
dec edx
cmp edi, edx
mov dword [esp + 0x20], edi
jae 0x51304a
mov eax, dword [ebx + 0xb4]
mov ecx, dword [ebx + 0x38]
mov edx, dword [eax + edi*8]
cmp edx, dword [eax + ecx*8]
lea ebp, [edi*8]
jg 0x513036
mov esi, dword [ebx + 0xac]
xor eax, eax
test esi, esi
jbe 0x512f9c
mov ecx, dword [ebx + 0xbc]
mov edi, edi
cmp dword [ecx], edi
je 0x512f64
mov edx, dword [ebx + 0xac]
inc eax
add ecx, 0x1c
cmp eax, edx
jb 0x512f50
jmp 0x512f9c
dec esi
cmp eax, esi
mov edx, eax
jae 0x512f96
imul eax, eax, 0x1c
mov edi, edi
mov ecx, dword [ebx + 0xbc]
lea edi, [eax + ecx]
lea esi, [edi + 0x1c]
mov ecx, 7
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebx + 0xac]
inc edx
add eax, 0x1c
dec ecx
cmp edx, ecx
jb 0x512f70
mov edi, dword [esp + 0x20]
dec dword [ebx + 0xac]
mov edx, dword [ebx + 0xa0]
dec edx
cmp edi, edx
jae 0x513030
lea esi, [edi + 1]
mov edi, edi
mov eax, dword [ebx + 0xb4]
mov ecx, dword [eax + ebp + 8]
add eax, ebp
mov dword [eax], ecx
mov edx, dword [eax + 0xc]
mov dword [eax + 4], edx
mov ecx, dword [ebx + 0xa4]
xor eax, eax
test ecx, ecx
jbe 0x512fed
mov edx, dword [ebx + 0xb8]
mov ecx, edx
cmp dword [ecx], esi
je 0x512fea
inc eax
add ecx, 4
cmp eax, dword [ebx + 0xa4]
jb 0x512fd8
jmp 0x512fed
dec dword [edx + eax*4]
mov ecx, dword [ebx + 0xac]
xor eax, eax
test ecx, ecx
jbe 0x51301e
mov edx, dword [ebx + 0xbc]
mov ecx, edx
cmp dword [ecx], esi
je 0x513013
inc eax
add ecx, 0x1c
cmp eax, dword [ebx + 0xac]
jb 0x513001
jmp 0x51301e
imul eax, eax, 0x1c
mov ecx, dword [eax + edx]
add eax, edx
dec ecx
mov dword [eax], ecx
mov eax, dword [ebx + 0xa0]
add ebp, 8
inc esi
dec eax
lea ecx, [esi - 1]
cmp ecx, eax
jb 0x512fb0
dec dword [ebx + 0xa0]
mov edx, dword [ebx + 0xa0]
inc edi
dec edx
cmp edi, edx
mov dword [esp + 0x20], edi
jb 0x512f20
pop ebp
pop edi
mov eax, 1
pop esi
add esp, 0x10
ret 0x1c