Function at 0x4aa4e9
Capabilities:
Log keystrokes via polling
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x9c
mov dword [ebp - 0x64], 0x530940
mov dword [ebp - 0x60], 0x531532
lea eax, [ebp - 0x5c]
lea edx, [ebp - 0x18]
mov dword [eax], edx
mov edx, 0x4aad9d
mov dword [eax + 4], edx
mov dword [eax + 8], esp
lea eax, [ebp - 0x7c]
mov dword [esp], eax
call fcn.004c3070
mov dword [ebp - 0x1c], 0
jmp 0x4aa52e
nop
jmp 0x4aa52e
nop
mov eax, dword [0x694c24]
cmp eax, 1
jne 0x4aa56b
mov dword [0x694c24], 2
jmp 0x4aa55c
mov dword [esp], 1
mov eax, dword [sym.imp.KERNEL32.dll_Sleep]
mov dword [ebp - 0x78], 0xffffffff
call eax
sub esp, 4
mov eax, dword [0x694c24]
cmp eax, 2
sete al
test al, al
jne 0x4aa544
mov eax, dword [0x6a4cc4]
test eax, eax
je 0x4aa581
mov eax, dword [0x6a4cc0]
test eax, eax
je 0x4aaca9
call fcn.00450bb3
mov dword [0xa2bd44], eax
mov edx, dword [0xa2bd44]
mov eax, dword [0x6af404]
mov ecx, edx
sub ecx, eax
mov eax, ecx
mov dword [0xa2bd44], eax
mov edx, dword [0xa2bd44]
mov eax, dword [0x6af400]
add eax, edx
mov dword [0xa2bd44], eax
mov ecx, dword [0xa2bd44]
mov edx, 0x31b5d43b
mov eax, ecx
mul edx
mov eax, edx
shr eax, 0x18
imul eax, eax, 0x5265c00
mov edx, ecx
sub edx, eax
mov eax, edx
mov dword [0xa2bd44], eax
mov eax, dword [0xa2bd44]
mov edx, 0
mov dword [ebp - 0x88], eax
mov dword [ebp - 0x84], edx
fild qword [ebp - 0x88]
fld qword [0x563188]
fmulp st(1)
fnstcw word [ebp - 0x7e]
movzx eax, word [ebp - 0x7e]
mov ah, 0xc
mov word [ebp - 0x80], ax
fldcw word [ebp - 0x80]
fistp qword [ebp - 0x88]
fldcw word [ebp - 0x7e]
mov eax, dword [ebp - 0x88]
mov edx, dword [ebp - 0x84]
mov dword [0xa2bd44], eax
mov eax, dword [0xa2bd44]
mov byte [0x57f70c], al
mov eax, dword [0xa2bd44]
shr eax, 8
mov byte [0x57f70d], al
mov eax, dword [0xa2bd44]
shr eax, 0x10
mov byte [0x57f70e], al
mov eax, dword [0xa2a710]
test eax, eax
je 0x4aa689
mov eax, dword [0xa2a710]
cmp eax, 0xffffffff
je 0x4aa66c
mov dword [0xa2a710], 0xffffffff
jmp 0x4aaabc
mov dword [esp], 0x40
mov eax, dword [sym.imp.KERNEL32.dll_Sleep]
mov dword [ebp - 0x78], 0xffffffff
call eax
sub esp, 4
jmp 0x4aa52e
mov dword [esp], 0xf
mov eax, dword [sym.imp.KERNEL32.dll_Sleep]
mov dword [ebp - 0x78], 0xffffffff
call eax
sub esp, 4
mov dword [0x6af414], 1
mov dword [0x6af410], 1
mov dword [esp], 1
mov eax, dword [sym.imp.KERNEL32.dll_Sleep]
call eax
sub esp, 4
movzx eax, byte [0x57f268]
test al, al
je 0x4aa6e0
mov dword [0x694c24], 2
jmp 0x4aacaa
mov eax, dword [0x68fb4c]
test eax, eax
jne 0x4aa6ee
call fcn.0047e10d
mov eax, dword [0x68fb4c]
test eax, eax
je 0x4aa9f3
mov dword [ebp - 0x28], 0
mov eax, dword [0x533054]
mov dword [esp + 8], eax
mov dword [esp + 4], str.input__d.txt
mov dword [esp], str.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
call sub.msvcrt.dll_sprintf
mov dword [esp + 4], 0x54fd5f
mov dword [esp], str.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
mov dword [ebp - 0x78], 0xffffffff
call sub.msvcrt.dll_fopen
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0
je 0x4aa9f3
mov dword [esp + 8], 2
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x28]
mov dword [esp], eax
call sub.msvcrt.dll_fseek
mov eax, dword [ebp - 0x28]
mov dword [esp], eax
call sub.msvcrt.dll_ftell
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x28]
mov dword [esp], eax
call sub.msvcrt.dll_rewind
cmp dword [ebp - 0x2c], 0
jle 0x4aa9e1
mov eax, dword [ebp - 0x2c]
add eax, 1
mov dword [esp + 4], eax
mov dword [esp], 1
call sub.msvcrt.dll_calloc
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x30], 0
je 0x4aa9e1
mov eax, dword [ebp - 0x2c]
mov edx, dword [ebp - 0x28]
mov dword [esp + 0xc], edx
mov dword [esp + 8], eax
mov dword [esp + 4], 1
mov eax, dword [ebp - 0x30]
mov dword [esp], eax
call sub.msvcrt.dll_fread
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x2c]
cmp eax, dword [ebp - 0x34]
jne 0x4aa9d6
mov eax, dword [ebp - 0x2c]
lea edx, [eax - 1]
mov eax, dword [ebp - 0x30]
add eax, edx
movzx eax, byte [eax]
cmp al, 0x2a
jne 0x4aa9d6
mov dword [ebp - 0x20], 0
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x24], eax
jmp 0x4aa823
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x30]
add eax, edx
movzx eax, byte [eax]
test al, al
je 0x4aa9a6
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x30]
add eax, edx
movzx eax, byte [eax]
cmp al, 0x3a
je 0x4aa835
add dword [ebp - 0x24], 1
mov eax, dword [ebp - 0x24]
cmp eax, dword [ebp - 0x2c]
setl al
test al, al
jne 0x4aa7fd
jmp 0x4aa9a7
nop
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x30]
add eax, edx
movzx eax, byte [eax]
movsx eax, al
mov dword [ebp - 0x38], eax
add dword [ebp - 0x20], 1
cmp dword [ebp - 0x38], 0x4d
jne 0x4aa890
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x30]
add edx, eax
lea eax, [ebp - 0x44]
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x40]
mov dword [esp + 8], eax
mov dword [esp + 4], str._d__d
mov dword [esp], edx
call sub.msvcrt.dll_sscanf
mov edx, dword [ebp - 0x44]
mov eax, dword [ebp - 0x40]
mov dword [esp + 4], edx
mov dword [esp], eax
mov dword [ebp - 0x78], 1
call fcn.004a7687
cmp dword [ebp - 0x38], 0x4c
jne 0x4aa8dd
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x30]
add edx, eax
lea eax, [ebp - 0x44]
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x40]
mov dword [esp + 8], eax
mov dword [esp + 4], str._d__d
mov dword [esp], edx
call sub.msvcrt.dll_sscanf
mov edx, dword [ebp - 0x44]
mov eax, dword [ebp - 0x40]
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov dword [esp], 0
mov dword [ebp - 0x78], 1
call fcn.004a73a2
cmp dword [ebp - 0x38], 0x6c
jne 0x4aa92a
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x30]
add edx, eax
lea eax, [ebp - 0x44]
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x40]
mov dword [esp + 8], eax
mov dword [esp + 4], str._d__d
mov dword [esp], edx
call sub.msvcrt.dll_sscanf
mov edx, dword [ebp - 0x44]
mov eax, dword [ebp - 0x40]
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov dword [esp], 0
mov dword [ebp - 0x78], 1
call fcn.004a71a8
cmp dword [ebp - 0x38], 0x44
jne 0x4aa961
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x30]
add edx, eax
lea eax, [ebp - 0x40]
mov dword [esp + 8], eax
mov dword [esp + 4], 0x54e1da
mov dword [esp], edx
call sub.msvcrt.dll_sscanf
mov eax, dword [ebp - 0x40]
mov dword [esp], eax
mov dword [ebp - 0x78], 1
call fcn.0045145e
cmp dword [ebp - 0x38], 0x55
jne 0x4aa998
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x30]
add edx, eax
lea eax, [ebp - 0x40]
mov dword [esp + 8], eax
mov dword [esp + 4], 0x54e1da
mov dword [esp], edx
call sub.msvcrt.dll_sscanf
mov eax, dword [ebp - 0x40]
mov dword [esp], eax
mov dword [ebp - 0x78], 1
call fcn.00451519
mov eax, dword [ebp - 0x24]
add eax, 1
mov dword [ebp - 0x20], eax
jmp 0x4aa7f5
nop
mov eax, dword [0x533054]
add eax, 1
mov dword [0x533054], eax
mov eax, dword [ebp - 0x30]
mov dword [esp], eax
call sub.msvcrt.dll_free
mov eax, dword [ebp - 0x28]
mov dword [esp], eax
mov dword [ebp - 0x78], 1
call sub.msvcrt.dll_fclose
jmp 0x4aa6fb
mov eax, dword [ebp - 0x30]
mov dword [esp], eax
call sub.msvcrt.dll_free
mov eax, dword [ebp - 0x28]
mov dword [esp], eax
mov dword [ebp - 0x78], 0xffffffff
call sub.msvcrt.dll_fclose
xor dword [ebp - 0x1c], 1
mov eax, dword [0x6a4c80]
test eax, eax
jne 0x4aaab6
mov dword [0x6a4c94], 1
mov eax, dword [0x6a4c90]
test eax, eax
je 0x4aaaac
mov dword [esp + 8], 1
fld qword [0x563008]
fstp qword [esp]
mov dword [ebp - 0x78], 0xffffffff
call fcn.00472dbe
fld qword [0x6a4c88]
fsubp st(1)
fabs
fld qword [0x5630c0]
fxch st(1)
fucompi st(1)
fstp st(0)
setae al
test al, al
je 0x4aaaac
mov eax, dword [0x6a4c84]
mov dword [esp], eax
call fcn.00492a55
mov dword [0x6a4c90], 0
call fcn.004841d5
mov dword [0xa2bd48], eax
mov eax, dword [0x6a4c84]
mov dword [esp], eax
call fcn.0048412c
mov dword [esp + 8], 2
mov dword [esp + 4], 0xf
mov dword [esp], 0
call fcn.0046e63d
mov eax, dword [0xa2bd48]
mov dword [esp], eax
call fcn.0048412c
mov dword [0x6a4c94], 0
cmp dword [ebp - 0x1c], 1
jne 0x4aaade
mov eax, dword [0x5332d8]
test eax, eax
je 0x4aaad1
mov dword [ebp - 0x78], 0xffffffff
call fcn.004aae2e
mov eax, dword [0x6af2cc]
add eax, 1
mov dword [0x6af2cc], eax
mov dword [0x6af410], 0
mov eax, dword [0xa2a710]
test eax, eax
jne 0x4aa52a
cmp dword [ebp - 0x1c], 0
jne 0x4aa52d
mov dword [esp], 0x91
mov eax, dword [sym.imp.USER32.dll_GetKeyState]
mov dword [ebp - 0x78], 0xffffffff
call eax
sub esp, 4
cwde
mov edx, eax
and edx, 1
mov dword [ebp - 0x8c], edx
mov dword [esp], 0x30d4b
call fcn.00450ee2
cmp dword [ebp - 0x8c], eax
setne al
test al, al
je 0x4aab77
mov dword [esp], 0x30d4b
call fcn.00450ee2
test eax, eax
setne al
test al, al
je 0x4aab5f
mov dword [esp], 0x30d4b
call fcn.00451241
jmp 0x4aab6b
mov dword [esp], 0x30d4b
call fcn.0045114f
mov dword [ebp - 0x78], 0xffffffff
call fcn.004acdbb
mov dword [esp], 0x14
mov eax, dword [sym.imp.USER32.dll_GetKeyState]
mov dword [ebp - 0x78], 0xffffffff
call eax
sub esp, 4
cwde
mov ecx, eax
and ecx, 1
mov dword [ebp - 0x90], ecx
mov dword [esp], 0x187cd
call fcn.00450ee2
cmp dword [ebp - 0x90], eax
setne al
test al, al
je 0x4aac0a
mov dword [esp], 0x187cd
call fcn.00450ee2
test eax, eax
setne al
test al, al
je 0x4aabe1
mov dword [0x6a4c68], 0x12d
mov dword [esp], 0x187cd
call fcn.00451519
jmp 0x4aabfe
mov dword [0x6a4c68], 0x12d
mov dword [esp], 0x187cd
mov dword [ebp - 0x78], 0xffffffff
call fcn.0045145e
mov dword [ebp - 0x78], 0xffffffff
call fcn.004acdbb
mov dword [esp], 0x90
mov eax, dword [sym.imp.USER32.dll_GetKeyState]
mov dword [ebp - 0x78], 0xffffffff
call eax
sub esp, 4
cwde
mov edx, eax
and edx, 1
mov dword [ebp - 0x94], edx
mov dword [esp], 0x187cc
call fcn.00450ee2
cmp dword [ebp - 0x94], eax
setne al
test al, al
je 0x4aac9d
mov dword [esp], 0x187cc
call fcn.00450ee2
test eax, eax
setne al
test al, al
je 0x4aac74
mov dword [0x6a4c68], 0x12c
mov dword [esp], 0x187cc
call fcn.00451519
jmp 0x4aac91
mov dword [0x6a4c68], 0x12c
mov dword [esp], 0x187cc
mov dword [ebp - 0x78], 0xffffffff
call fcn.0045145e
mov dword [ebp - 0x78], 0xffffffff
call fcn.004acdbb
mov eax, dword [0xa2a710]
test eax, eax
jmp 0x4aa52d
nop
mov byte [0x57f299], 1
mov dword [0x57f294], 1
jmp 0x4aacd5
mov dword [esp], 0x10
mov eax, dword [sym.imp.KERNEL32.dll_Sleep]
mov dword [ebp - 0x78], 0xffffffff
call eax
sub esp, 4
mov eax, dword [0x6a4c7c]
cmp eax, 3
setne al
test al, al
jne 0x4aacbd
mov eax, dword [0x6a4c90]
test eax, eax
je 0x4aacfa
mov eax, dword [0x6a4c84]
mov dword [esp], eax
call fcn.00492a55
mov dword [esp + 4], 0
mov dword [esp], 0
mov dword [ebp - 0x78], 0xffffffff
call fcn.00473c03
mov eax, dword [0x68fb4c]
test eax, eax
jne 0x4aad23
call fcn.0047e119
mov eax, dword [0x68fb4c]
test eax, eax
je 0x4aad8a
mov dword [esp + 4], 0x54e232
mov dword [esp], str..._final.txt
mov dword [ebp - 0x78], 0xffffffff
call sub.msvcrt.dll_fopen
mov dword [ebp - 0x3c], eax
cmp dword [ebp - 0x3c], 0
je 0x4aad7e
mov eax, dword [ebp - 0x3c]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x17
mov dword [esp + 4], 1
mov dword [esp], str.Program_exited_normally
call sub.msvcrt.dll_fwrite
mov eax, dword [ebp - 0x3c]
mov dword [esp], eax
call sub.msvcrt.dll_fclose
mov dword [esp], 0
call sub.msvcrt.dll_exit
mov eax, dword [0x694c38]
mov edx, dword [0x694c3c]
mov dword [esp], eax
call sub.msvcrt.dll_exit
lea ebp, [ebp + 0x18]
mov eax, dword [ebp - 0x74]
mov dword [esp], eax
mov dword [ebp - 0x78], 0xffffffff
call fcn.004c3510