Function at 0x478670
Capabilities:
Get graphical window text
Log keystrokes via polling

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x42c
push ebx
push esi
push edi
mov edi, ecx
mov ecx, dword [0x5a56d8]
xor ebx, ebx
cmp ecx, edi
mov esi, edx
mov dword [esp + 0x2c], esi
mov dword [esp + 0x20], edi
mov dword [esp + 0x14], ebx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x1c], ebx
jne 0x4786a8
call fcn.00456cf0
mov ecx, edi
call fcn.00542c90
cmp eax, ebx
mov dword [esp + 0xc], eax
je 0x4790f9
mov ecx, dword [eax + 0xbbc]
mov dword [esp + 0x28], ecx
call fcn.004e2760
test eax, eax
je 0x4790f9
test esi, esi
je 0x4790f9
mov edi, dword [esp + 0xc]
cmp esi, dword [edi + 0x86c]
je 0x4786f2
cmp esi, dword [edi + 0x870]
jne 0x4790f9
mov eax, dword [ebp + 8]
cmp eax, 3
jne 0x4788aa
mov dword [esp + 0x30], 1
mov dword [ebp + 8], 0
mov eax, dword [edi + 0x8a0]
test eax, eax
je 0x47874f
mov edx, dword [edi + 0x89c]
lea eax, [esp + 0x18]
push eax
push 0
mov ecx, esi
call fcn.00477a90
mov edx, dword [edi + 0x89c]
lea ecx, [esp + 0x10]
push ecx
mov ecx, esi
call fcn.004778f0
mov edx, dword [esp + 0x18]
cmp edx, dword [esp + 0x10]
jl 0x4790f9
mov edi, dword [esp + 0xc]
push 0x7f00
push 0
call dword [sym.imp.USER32.dll_LoadCursorA]
push eax
call dword [sym.imp.USER32.dll_SetCursor]
push 0
push 0
push 0xe
push esi
call dword [sym.imp.USER32.dll_SendMessageA]
mov ebx, eax
test ebx, ebx
jle 0x478a0d
mov eax, dword [0x5b1220]
test eax, eax
mov dword [esp + 0x10], 0
je 0x4787d7
mov eax, dword [edi + 0x89c]
test eax, eax
je 0x4787d7
xor ecx, ecx
mov eax, ecx
mov dword [esp + 0x38], ecx
or eax, 2
mov ecx, edi
mov dword [esp + 0x34], eax
call fcn.0048d560
push 0
lea edx, [esp + 0x38]
push edx
push 0x45f
push esi
mov dword [esp + 0x48], eax
call dword [sym.imp.USER32.dll_SendMessageA]
cmp eax, 0x80070057
je 0x4787d7
cmp eax, ebx
jle 0x4787cf
mov ebx, eax
mov dword [esp + 0x10], 1
mov eax, dword [edi + 0x870]
xor ecx, ecx
test eax, eax
je 0x47880c
cmp eax, esi
jne 0x47880c
mov dl, byte [edi + 0x8de]
test dl, dl
lea eax, [edi + 0x8de]
je 0x47880c
lea edx, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x478800
sub eax, edx
lea ecx, [eax + 0xa]
lea edi, [ecx + ebx + 0xa]
cmp edi, 0x3e7
jge 0x47881d
mov edi, 0x3e7
push edi
call fcn.00570098
add esp, 4
test eax, eax
mov dword [esp + 0x1c], eax
je 0x4790f9
mov ecx, edi
mov edi, dword [esp + 0x1c]
mov edx, ecx
shr ecx, 2
xor eax, eax
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [esp + 0x10]
test eax, eax
je 0x478996
xor ecx, ecx
mov dword [esp + 0x3c], ecx
mov eax, ecx
mov dword [esp + 0x44], ecx
mov dword [esp + 0x48], ecx
mov dword [esp + 0x4c], ecx
mov ecx, dword [esp + 0xc]
or eax, 1
mov dword [esp + 0x40], eax
call fcn.0048d560
mov edx, dword [esp + 0x1c]
mov edi, dword [sym.imp.USER32.dll_SendMessageA]
push edx
mov dword [esp + 0x48], eax
lea eax, [esp + 0x40]
push eax
push 0x45e
add ebx, 5
push esi
mov dword [esp + 0x4c], ebx
call edi
mov ebx, eax
test ebx, ebx
jg 0x4789ac
jmp 0x47899c
cmp eax, 2
jne 0x47870d
mov eax, dword [edi + 0x8a0]
test eax, eax
je 0x4790e0
mov edi, dword [esp + 0xc]
mov edx, dword [edi + 0x89c]
lea ecx, [esp + 0x18]
push ecx
push 0
mov ecx, esi
call fcn.00477a90
lea edx, [esp + 0x10]
push edx
mov edx, dword [edi + 0x89c]
mov ecx, esi
call fcn.004778f0
mov ebx, dword [esp + 0x18]
mov eax, dword [esp + 0x10]
cmp ebx, eax
jge 0x478931
push ebx
mov edx, 1
push ebx
mov ecx, esi
mov dword [0x5a7220], edx
call fcn.004779b0
push 0x583b70
push ebx
push 0xc2
push esi
call dword [sym.imp.USER32.dll_SendMessageA]
push esi
call dword [sym.imp.USER32.dll_UpdateWindow]
mov dword [esp + 0x14], 2
jmp 0x4790f9
test eax, eax
jle 0x4790f9
push 0x7d000
push 0x7d000
mov edx, 1
mov ecx, esi
mov dword [0x5a7220], 1
call fcn.004779b0
push 0x583b70
push 0
push 0xc2
push esi
call dword [sym.imp.USER32.dll_SendMessageA]
push esi
call dword [sym.imp.USER32.dll_UpdateWindow]
push 0x7d000
push 0x7d000
mov edx, 1
mov ecx, esi
call fcn.004779b0
mov dword [esp + 0x14], 2
jmp 0x4790f9
mov edi, dword [sym.imp.USER32.dll_SendMessageA]
mov ecx, dword [esp + 0x1c]
push ecx
add ebx, 5
push ebx
push 0xd
push esi
call edi
mov ebx, eax
push 0x583b74
push 0
push 0xc
push esi
mov dword [0x5a7220], 1
call edi
push 0
push 0
push 0xcd
push esi
call edi
push esi
call dword [sym.imp.USER32.dll_UpdateWindow]
mov edx, dword [esp + 0xc]
mov esi, dword [sym.imp.USER32.dll_IsIconic]
mov dword [0x5a7220], 0
mov eax, dword [edx]
push eax
call esi
test eax, eax
jne 0x478a14
mov ecx, dword [esp + 0xc]
mov edx, dword [ecx]
push edx
call dword [sym.imp.USER32.dll_IsWindowVisible]
test eax, eax
je 0x478a14
test ebx, ebx
jg 0x478a66
cmp dword [ebp + 8], 1
jne 0x478a14
xor ecx, ecx
call fcn.0041d520
mov ecx, dword [esp + 0xc]
call fcn.00542ed0
test eax, eax
je 0x4790e0
mov ecx, dword [esp + 0xc]
mov eax, dword [ecx + 0x86c]
test eax, eax
je 0x47905d
mov esi, dword [esp + 0x2c]
cmp eax, esi
jne 0x47905d
mov dl, byte [ecx + 0xb58]
test dl, dl
lea eax, [ecx + 0xb58]
je 0x47905d
mov dword [0x5a7220], 1
jmp 0x4790b4
mov edi, dword [esp + 0x1c]
mov byte [ebx + edi], 0
mov eax, dword [0x5a9e30]
test eax, eax
je 0x478a9c
mov eax, dword [0x5b4314]
push eax
call esi
test eax, eax
jne 0x4790e8
mov ecx, dword [0x5b4314]
push ecx
call dword [sym.imp.USER32.dll_IsWindowVisible]
test eax, eax
je 0x4790e8
mov ecx, dword [esp + 0x28]
call fcn.0052a730
mov edx, dword [esp + 0xc]
mov eax, dword [edx + 0x8a0]
test eax, eax
jne 0x478b57
mov eax, dword [esp + 0x30]
test eax, eax
je 0x478b57
cmp byte [edi], 0
je 0x478b4b
lea esp, [esp]
push 0x583b70
push edi
call fcn.00570b40
add esp, 8
test eax, eax
je 0x478ae7
lea esi, [eax + 2]
jmp 0x478b0e
push 0x58445c
push edi
call fcn.00570b40
add esp, 8
test eax, eax
jne 0x478b0b
push 0x583b8c
push edi
call fcn.00570b40
add esp, 8
test eax, eax
je 0x478b46
lea esi, [eax + 1]
mov byte [eax], 0
cmp byte [esi], 0
je 0x478b35
mov ecx, esi
lea ebx, [ecx + 1]
jmp 0x478b20
mov dl, byte [ecx]
inc ecx
test dl, dl
jne 0x478b20
sub ecx, ebx
inc ecx
push ecx
push esi
push eax
call fcn.00571040
add esp, 0xc
cmp byte [edi], 0
jne 0x478ad0
xor ecx, ecx
call fcn.0041d520
jmp 0x4790e8
cmp byte [edi], 0
jne 0x478b57
xor ecx, ecx
call fcn.0041d520
jmp 0x4790e8
mov edx, dword [esp + 0x1c]
mov edi, 0x585f30
mov esi, edx
mov ecx, 2
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x47904f
mov edi, 0x586a88
mov esi, edx
mov ecx, 4
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x47904f
mov edi, 0x586a84
mov esi, edx
mov ecx, 3
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x47904f
mov edi, 0x586a80
mov esi, edx
mov ecx, 3
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x47904f
mov edi, 0x586a7c
mov esi, edx
mov ecx, 3
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x478fc3
mov edi, str.___r_n
mov esi, edx
mov ecx, 5
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x478fc3
mov edi, 0x586a6c
mov esi, edx
mov ecx, 4
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x478fc3
mov edi, 0x586a64
mov esi, edx
mov ecx, 4
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x478fc3
mov ecx, dword [esp + 0x28]
mov eax, dword [ecx + 0x20e0]
xor esi, esi
cmp eax, esi
je 0x478c2a
jmp 0x478c20
mov dword [eax + 0x1c], esi
mov eax, dword [eax + 0x40]
cmp eax, esi
jne 0x478c20
mov dword [ecx + 0x20e8], esi
mov dword [ecx + 0x1910], esi
mov dl, byte [edx]
cmp dl, 0x2f
mov dword [esp + 0x10], esi
je 0x478c6b
cmp dl, byte [0x59bce4]
je 0x478c6b
mov ecx, dword [esp + 0x20]
call fcn.0042c4d0
cmp eax, esi
je 0x478c76
cmp dword [eax + 0x520], 3
je 0x478c76
xor ecx, ecx
call fcn.0041d520
jmp 0x4790e8
mov edi, 1
mov dword [esp + 0x10], edi
jmp 0x478c7b
mov edi, 1
mov ecx, dword [esp + 0xc]
mov eax, dword [ecx + 0x870]
cmp eax, esi
mov dword [esp + 0x30], esi
je 0x478ca1
cmp eax, dword [esp + 0x2c]
jne 0x478ca1
mov al, byte [ecx + 0x8de]
test al, al
je 0x478ca1
mov dword [esp + 0x30], edi
test byte [0x5a7214], 1
mov dword [0x5a721c], esi
mov dword [0x5a7218], esi
mov esi, dword [sym.imp.USER32.dll_GetKeyState]
jne 0x478ce3
push 0xd
call esi
test ah, ah
js 0x478ce3
test byte [0x5a7214], 2
jne 0x478cd5
push 0x11
call esi
test ah, ah
jns 0x478cdb
mov dword [0x5a7218], edi
mov dword [0x5a721c], edi
jmp 0x478cfa
test byte [0x5a7214], 2
jne 0x478cf4
push 0x11
call esi
test ah, ah
jns 0x478cfa
mov dword [0x5a7218], edi
mov ebx, dword [esp + 0x1c]
cmp byte [ebx], 0
je 0x478a14
jmp 0x478d10
push 0x583b70
push ebx
call fcn.00570b40
add esp, 8
test eax, eax
je 0x478d2a
mov byte [eax], 0
add eax, 2
jmp 0x478d56
push 0x58445c
push ebx
call fcn.00570b40
add esp, 8
test eax, eax
jne 0x478d52
push 0x583b8c
push ebx
call fcn.00570b40
add esp, 8
test eax, eax
mov dword [esp + 0x14], eax
je 0x478d5a
mov byte [eax], 0
inc eax
mov dword [esp + 0x14], eax
mov esi, ebx
lea edx, [esi + 1]
nop
mov cl, byte [esi]
inc esi
test cl, cl
jne 0x478d60
sub esi, edx
test esi, esi
mov dword [esp + 0x18], esi
jle 0x478fab
cmp esi, 0x3b5
jle 0x478d86
mov esi, 0x3b5
mov dword [esp + 0x18], esi
mov cl, byte [esi + ebx]
mov byte [esi + ebx], 0
mov eax, dword [0x5a7224]
test eax, eax
mov byte [esp + 0x27], cl
je 0x478da3
push eax
call fcn.005700aa
add esp, 4
mov eax, ebx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x478da8
sub eax, edx
add eax, 0xa
push eax
call fcn.00570098
add esp, 4
test eax, eax
mov dword [0x5a7224], eax
je 0x478dda
mov ecx, ebx
mov edx, eax
lea ebx, [ebx]
mov al, byte [ecx]
inc ecx
mov byte [edx], al
inc edx
test al, al
jne 0x478dd0
mov ecx, dword [esp + 0x20]
mov edx, ebx
call fcn.00422380
xor eax, eax
mov ecx, 0xf9
lea edi, [esp + 0x50]
rep stosd dword es:[edi], eax
mov ecx, dword [0x5a7218]
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, ecx
neg eax
sbb eax, eax
and eax, 3
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x30]
test eax, eax
je 0x478ea2
test ecx, ecx
mov dword [esp + 0x34], 0
je 0x478e51
mov esi, dword [esp + 0xc]
add esi, 0x8de
push ebx
push esi
call fcn.005809c6
add esp, 8
test eax, eax
je 0x478ea2
push esi
lea edx, [esp + 0x54]
push 0x58459c
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
push ebx
lea eax, [esp + 0x60]
push eax
jmp 0x478e88
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x478ea2
mov esi, dword [esp + 0xc]
add esi, 0x8de
push ebx
push esi
call fcn.005809c6
add esp, 8
test eax, eax
je 0x478ea2
push esi
lea ecx, [esp + 0x54]
push 0x58459c
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
push ebx
lea edx, [esp + 0x60]
push edx
call fcn.005809c6
add esp, 0x14
test eax, eax
jne 0x478ea2
lea edi, [esp + 0x50]
mov ecx, 0xf9
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, ebx
mov esi, ebx
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x478ea6
lea edi, [esp + 0x50]
sub eax, esi
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x478eb4
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov al, byte [esp + 0x27]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x18]
mov byte [ecx + ebx], al
mov eax, dword [0x5ae60c]
test eax, eax
mov esi, 1
je 0x478f37
mov eax, dword [esp + 0x10]
test eax, eax
mov dword [esp + 0x18], 0
je 0x478f15
mov ecx, dword [0x5a7224]
push 0
lea edx, [esp + 0x1c]
call fcn.004f4510
mov eax, dword [esp + 0x18]
test eax, eax
je 0x478f15
mov eax, dword [0x5a7218]
test eax, eax
je 0x478f37
mov edx, dword [esp + 0xc]
mov ecx, dword [esp + 0x28]
push 0
push 0
push 0
push 0x1e
push str.INPUT
push 0
call fcn.0050e610
test eax, eax
jne 0x478f37
xor esi, esi
mov edx, dword [esp + 0x20]
push edx
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x478f53
mov ecx, dword [esp + 0xc]
call fcn.00542ed0
test eax, eax
jne 0x478f5d
xor eax, eax
mov dword [esp + 0x20], eax
mov dword [esp + 0xc], eax
mov ecx, dword [esp + 0x28]
call fcn.004e2760
test eax, eax
je 0x478a14
test esi, esi
je 0x478f9b
mov eax, dword [esp + 0x20]
test eax, eax
je 0x478a14
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x34]
push eax
push 0
push 0
push ecx
mov ecx, dword [esp + 0x30]
push 0
lea edx, [esp + 0x64]
call fcn.0043e080
mov eax, dword [esp + 0x20]
test eax, eax
je 0x478a14
mov eax, dword [esp + 0x14]
test eax, eax
je 0x478a14
cmp byte [eax], 0
mov ebx, eax
jne 0x478d10
jmp 0x478a14
mov eax, dword [0x5a7224]
test eax, eax
jne 0x478fd8
xor ecx, ecx
call fcn.0041d520
jmp 0x4790e8
push 0x583b8c
push eax
call fcn.00570b40
add esp, 8
test eax, eax
je 0x478fed
mov byte [eax], 0
mov edx, dword [0x5a7224]
push 0x58445c
push edx
call fcn.00570b40
add esp, 8
test eax, eax
je 0x479008
mov byte [eax], 0
mov eax, dword [0x5a7224]
mov edi, dword [esp + 0x2c]
push eax
push 0
push 0xc
push edi
mov dword [0x5a7220], 1
call dword [sym.imp.USER32.dll_SendMessageA]
mov ecx, dword [0x5a7224]
mov eax, ecx
lea esi, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x479032
sub eax, esi
lea esi, [ecx + 1]
mov edi, edi
mov dl, byte [ecx]
inc ecx
test dl, dl
jne 0x479040
sub ecx, esi
push eax
push ecx
mov ecx, edi
jmp 0x4790cc
mov ecx, dword [esp + 0x20]
call fcn.00422580
jmp 0x4790e0
mov eax, dword [ecx + 0x870]
test eax, eax
je 0x4790e0
cmp eax, dword [esp + 0x2c]
jne 0x4790e0
mov eax, dword [esp + 0xc]
mov cl, byte [eax + 0x8de]
add eax, 0x8de
test cl, cl
je 0x4790e0
mov ecx, dword [esp + 0xc]
mov edx, dword [ecx + 0x944]
test edx, edx
je 0x4790e0
push eax
lea edx, [esp + 0x54]
push 0x58459c
push edx
mov dword [0x5a7220], 1
call dword [sym.imp.USER32.dll_wsprintfA]
mov esi, dword [esp + 0x38]
add esp, 0xc
lea eax, [esp + 0x50]
push eax
push 0
push 0xc
push esi
call dword [sym.imp.USER32.dll_SendMessageA]
push 0x7d000
push 0x7d000
mov ecx, esi
mov edx, 1
call fcn.004779b0
mov dword [0x5a7220], 0
mov dword [esp + 0x14], 1
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x4790f9
push eax
call fcn.005700aa
add esp, 4
xor eax, eax
pop edi
pop esi
mov dword [0x5a7214], eax
mov dword [0x5a7218], eax
mov dword [0x5a721c], eax
mov dword [0x5a7220], eax
mov eax, dword [esp + 0xc]
pop ebx
mov esp, ebp
pop ebp
ret 4