Function at 0x4aacbd
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], 0x531120
mov dword [ebp - 0x60], 0x531d12
lea eax, [ebp - 0x5c]
lea edx, [ebp - 0x18]
mov dword [eax], edx
mov edx, 0x4ab571
mov dword [eax + 4], edx
mov dword [eax + 8], esp
lea eax, [ebp - 0x7c]
mov dword [esp], eax
call fcn.004c3850
mov dword [ebp - 0x1c], 0
jmp 0x4aad02
nop
jmp 0x4aad02
nop
mov eax, dword [0x695c44]
cmp eax, 1
jne 0x4aad3f
mov dword [0x695c44], 2
jmp 0x4aad30
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 [0x695c44]
cmp eax, 2
sete al
test al, al
jne 0x4aad18
mov eax, dword [0x6a5ce4]
test eax, eax
je 0x4aad55
mov eax, dword [0x6a5ce0]
test eax, eax
je 0x4ab47d
call fcn.00451387
mov dword [0xa2cd64], eax
mov edx, dword [0xa2cd64]
mov eax, dword [0x6b0424]
mov ecx, edx
sub ecx, eax
mov eax, ecx
mov dword [0xa2cd64], eax
mov edx, dword [0xa2cd64]
mov eax, dword [0x6b0420]
add eax, edx
mov dword [0xa2cd64], eax
mov ecx, dword [0xa2cd64]
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 [0xa2cd64], eax
mov eax, dword [0xa2cd64]
mov edx, 0
mov dword [ebp - 0x88], eax
mov dword [ebp - 0x84], edx
fild qword [ebp - 0x88]
fld qword [0x564188]
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 [0xa2cd64], eax
mov eax, dword [0xa2cd64]
mov byte [0x58070c], al
mov eax, dword [0xa2cd64]
shr eax, 8
mov byte [0x58070d], al
mov eax, dword [0xa2cd64]
shr eax, 0x10
mov byte [0x58070e], al
mov eax, dword [0xa2b730]
test eax, eax
je 0x4aae5d
mov eax, dword [0xa2b730]
cmp eax, 0xffffffff
je 0x4aae40
mov dword [0xa2b730], 0xffffffff
jmp 0x4ab290
mov dword [esp], 0x40
mov eax, dword [sym.imp.KERNEL32.dll_Sleep]
mov dword [ebp - 0x78], 0xffffffff
call eax
sub esp, 4
jmp 0x4aad02
mov dword [esp], 0xf
mov eax, dword [sym.imp.KERNEL32.dll_Sleep]
mov dword [ebp - 0x78], 0xffffffff
call eax
sub esp, 4
mov dword [0x6b0434], 1
mov dword [0x6b0430], 1
mov dword [esp], 1
mov eax, dword [sym.imp.KERNEL32.dll_Sleep]
call eax
sub esp, 4
movzx eax, byte [0x580268]
test al, al
je 0x4aaeb4
mov dword [0x695c44], 2
jmp 0x4ab47e
mov eax, dword [0x690b4c]
test eax, eax
jne 0x4aaec2
call fcn.0047e8e1
mov eax, dword [0x690b4c]
test eax, eax
je 0x4ab1c7
mov dword [ebp - 0x28], 0
mov eax, dword [0x534054]
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], 0x550d5f
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 0x4ab1c7
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 0x4ab1b5
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 0x4ab1b5
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 0x4ab1aa
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 0x4ab1aa
mov dword [ebp - 0x20], 0
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x24], eax
jmp 0x4aaff7
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x30]
add eax, edx
movzx eax, byte [eax]
test al, al
je 0x4ab17a
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x30]
add eax, edx
movzx eax, byte [eax]
cmp al, 0x3a
je 0x4ab009
add dword [ebp - 0x24], 1
mov eax, dword [ebp - 0x24]
cmp eax, dword [ebp - 0x2c]
setl al
test al, al
jne 0x4aafd1
jmp 0x4ab17b
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 0x4ab064
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.004a7e5b
cmp dword [ebp - 0x38], 0x4c
jne 0x4ab0b1
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.004a7b76
cmp dword [ebp - 0x38], 0x6c
jne 0x4ab0fe
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.004a797c
cmp dword [ebp - 0x38], 0x44
jne 0x4ab135
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], 0x54f1da
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.00451c32
cmp dword [ebp - 0x38], 0x55
jne 0x4ab16c
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], 0x54f1da
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.00451ced
mov eax, dword [ebp - 0x24]
add eax, 1
mov dword [ebp - 0x20], eax
jmp 0x4aafc9
nop
mov eax, dword [0x534054]
add eax, 1
mov dword [0x534054], 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 0x4aaecf
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 [0x6a5ca0]
test eax, eax
jne 0x4ab28a
mov dword [0x6a5cb4], 1
mov eax, dword [0x6a5cb0]
test eax, eax
je 0x4ab280
mov dword [esp + 8], 1
fld qword [0x564008]
fstp qword [esp]
mov dword [ebp - 0x78], 0xffffffff
call fcn.00473592
fld qword [0x6a5ca8]
fsubp st(1)
fabs
fld qword [0x5640c0]
fxch st(1)
fucompi st(1)
fstp st(0)
setae al
test al, al
je 0x4ab280
mov eax, dword [0x6a5ca4]
mov dword [esp], eax
call fcn.00493229
mov dword [0x6a5cb0], 0
call fcn.004849a9
mov dword [0xa2cd68], eax
mov eax, dword [0x6a5ca4]
mov dword [esp], eax
call fcn.00484900
mov dword [esp + 8], 2
mov dword [esp + 4], 0xf
mov dword [esp], 0
call fcn.0046ee11
mov eax, dword [0xa2cd68]
mov dword [esp], eax
call fcn.00484900
mov dword [0x6a5cb4], 0
cmp dword [ebp - 0x1c], 1
jne 0x4ab2b2
mov eax, dword [0x5342d8]
test eax, eax
je 0x4ab2a5
mov dword [ebp - 0x78], 0xffffffff
call fcn.004ab602
mov eax, dword [0x6b02ec]
add eax, 1
mov dword [0x6b02ec], eax
mov dword [0x6b0430], 0
mov eax, dword [0xa2b730]
test eax, eax
jne 0x4aacfe
cmp dword [ebp - 0x1c], 0
jne 0x4aad01
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.004516b6
cmp dword [ebp - 0x8c], eax
setne al
test al, al
je 0x4ab34b
mov dword [esp], 0x30d4b
call fcn.004516b6
test eax, eax
setne al
test al, al
je 0x4ab333
mov dword [esp], 0x30d4b
call fcn.00451a15
jmp 0x4ab33f
mov dword [esp], 0x30d4b
call fcn.00451923
mov dword [ebp - 0x78], 0xffffffff
call fcn.004ad58f
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.004516b6
cmp dword [ebp - 0x90], eax
setne al
test al, al
je 0x4ab3de
mov dword [esp], 0x187cd
call fcn.004516b6
test eax, eax
setne al
test al, al
je 0x4ab3b5
mov dword [0x6a5c88], 0x12d
mov dword [esp], 0x187cd
call fcn.00451ced
jmp 0x4ab3d2
mov dword [0x6a5c88], 0x12d
mov dword [esp], 0x187cd
mov dword [ebp - 0x78], 0xffffffff
call fcn.00451c32
mov dword [ebp - 0x78], 0xffffffff
call fcn.004ad58f
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.004516b6
cmp dword [ebp - 0x94], eax
setne al
test al, al
je 0x4ab471
mov dword [esp], 0x187cc
call fcn.004516b6
test eax, eax
setne al
test al, al
je 0x4ab448
mov dword [0x6a5c88], 0x12c
mov dword [esp], 0x187cc
call fcn.00451ced
jmp 0x4ab465
mov dword [0x6a5c88], 0x12c
mov dword [esp], 0x187cc
mov dword [ebp - 0x78], 0xffffffff
call fcn.00451c32
mov dword [ebp - 0x78], 0xffffffff
call fcn.004ad58f
mov eax, dword [0xa2b730]
test eax, eax
jmp 0x4aad01
nop
mov byte [0x580299], 1
mov dword [0x580294], 1
jmp 0x4ab4a9
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 [0x6a5c9c]
cmp eax, 3
setne al
test al, al
jne 0x4ab491
mov eax, dword [0x6a5cb0]
test eax, eax
je 0x4ab4ce
mov eax, dword [0x6a5ca4]
mov dword [esp], eax
call fcn.00493229
mov dword [esp + 4], 0
mov dword [esp], 0
mov dword [ebp - 0x78], 0xffffffff
call fcn.004743d7
mov eax, dword [0x690b4c]
test eax, eax
jne 0x4ab4f7
call fcn.0047e8ed
mov eax, dword [0x690b4c]
test eax, eax
je 0x4ab55e
mov dword [esp + 4], 0x54f232
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 0x4ab552
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 [0x695c58]
mov edx, dword [0x695c5c]
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.004c3cf0