Function at 0x4a5925
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], 0x52bda0
mov dword [ebp - 0x60], 0x52c992
lea eax, [ebp - 0x5c]
lea edx, [ebp - 0x18]
mov dword [eax], edx
mov edx, 0x4a61d9
mov dword [eax + 4], edx
mov dword [eax + 8], esp
lea eax, [ebp - 0x7c]
mov dword [esp], eax
call fcn.004be4b0
mov dword [ebp - 0x1c], 0
jmp 0x4a596a
nop
jmp 0x4a596a
nop
mov eax, dword [0x690824]
cmp eax, 1
jne 0x4a59a7
mov dword [0x690824], 2
jmp 0x4a5998
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 [0x690824]
cmp eax, 2
sete al
test al, al
jne 0x4a5980
mov eax, dword [0x6a08c4]
test eax, eax
je 0x4a59bd
mov eax, dword [0x6a08c0]
test eax, eax
je 0x4a60e5
call fcn.0044bfef
mov dword [0xa27944], eax
mov edx, dword [0xa27944]
mov eax, dword [0x6ab004]
mov ecx, edx
sub ecx, eax
mov eax, ecx
mov dword [0xa27944], eax
mov edx, dword [0xa27944]
mov eax, dword [0x6ab000]
add eax, edx
mov dword [0xa27944], eax
mov ecx, dword [0xa27944]
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 [0xa27944], eax
mov eax, dword [0xa27944]
mov edx, 0
mov dword [ebp - 0x88], eax
mov dword [ebp - 0x84], edx
fild qword [ebp - 0x88]
fld qword [0x55f0c8]
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 [0xa27944], eax
mov eax, dword [0xa27944]
mov byte [0x57b70c], al
mov eax, dword [0xa27944]
shr eax, 8
mov byte [0x57b70d], al
mov eax, dword [0xa27944]
shr eax, 0x10
mov byte [0x57b70e], al
mov eax, dword [0xa26310]
test eax, eax
je 0x4a5ac5
mov eax, dword [0xa26310]
cmp eax, 0xffffffff
je 0x4a5aa8
mov dword [0xa26310], 0xffffffff
jmp 0x4a5ef8
mov dword [esp], 0x40
mov eax, dword [sym.imp.KERNEL32.dll_Sleep]
mov dword [ebp - 0x78], 0xffffffff
call eax
sub esp, 4
jmp 0x4a596a
mov dword [esp], 0xf
mov eax, dword [sym.imp.KERNEL32.dll_Sleep]
mov dword [ebp - 0x78], 0xffffffff
call eax
sub esp, 4
mov dword [0x6ab014], 1
mov dword [0x6ab010], 1
mov dword [esp], 1
mov eax, dword [sym.imp.KERNEL32.dll_Sleep]
call eax
sub esp, 4
movzx eax, byte [0x57b268]
test al, al
je 0x4a5b1c
mov dword [0x690824], 2
jmp 0x4a60e6
mov eax, dword [0x68bb4c]
test eax, eax
jne 0x4a5b2a
call fcn.00479549
mov eax, dword [0x68bb4c]
test eax, eax
je 0x4a5e2f
mov dword [ebp - 0x28], 0
mov eax, dword [0x52f054]
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], 0x54bc9f
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 0x4a5e2f
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 0x4a5e1d
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 0x4a5e1d
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 0x4a5e12
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 0x4a5e12
mov dword [ebp - 0x20], 0
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x24], eax
jmp 0x4a5c5f
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x30]
add eax, edx
movzx eax, byte [eax]
test al, al
je 0x4a5de2
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x30]
add eax, edx
movzx eax, byte [eax]
cmp al, 0x3a
je 0x4a5c71
add dword [ebp - 0x24], 1
mov eax, dword [ebp - 0x24]
cmp eax, dword [ebp - 0x2c]
setl al
test al, al
jne 0x4a5c39
jmp 0x4a5de3
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 0x4a5ccc
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.004a2ac3
cmp dword [ebp - 0x38], 0x4c
jne 0x4a5d19
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.004a27de
cmp dword [ebp - 0x38], 0x6c
jne 0x4a5d66
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.004a25e4
cmp dword [ebp - 0x38], 0x44
jne 0x4a5d9d
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], 0x54a11a
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.0044c89a
cmp dword [ebp - 0x38], 0x55
jne 0x4a5dd4
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], 0x54a11a
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.0044c955
mov eax, dword [ebp - 0x24]
add eax, 1
mov dword [ebp - 0x20], eax
jmp 0x4a5c31
nop
mov eax, dword [0x52f054]
add eax, 1
mov dword [0x52f054], 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 0x4a5b37
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 [0x6a0880]
test eax, eax
jne 0x4a5ef2
mov dword [0x6a0894], 1
mov eax, dword [0x6a0890]
test eax, eax
je 0x4a5ee8
mov dword [esp + 8], 1
fld qword [0x55ef48]
fstp qword [esp]
mov dword [ebp - 0x78], 0xffffffff
call fcn.0046e1fa
fld qword [0x6a0888]
fsubp st(1)
fabs
fld qword [0x55f000]
fxch st(1)
fucompi st(1)
fstp st(0)
setae al
test al, al
je 0x4a5ee8
mov eax, dword [0x6a0884]
mov dword [esp], eax
call fcn.0048de91
mov dword [0x6a0890], 0
call fcn.0047f611
mov dword [0xa27948], eax
mov eax, dword [0x6a0884]
mov dword [esp], eax
call fcn.0047f568
mov dword [esp + 8], 2
mov dword [esp + 4], 0xf
mov dword [esp], 0
call fcn.00469a79
mov eax, dword [0xa27948]
mov dword [esp], eax
call fcn.0047f568
mov dword [0x6a0894], 0
cmp dword [ebp - 0x1c], 1
jne 0x4a5f1a
mov eax, dword [0x52f2d8]
test eax, eax
je 0x4a5f0d
mov dword [ebp - 0x78], 0xffffffff
call fcn.004a626a
mov eax, dword [0x6aaecc]
add eax, 1
mov dword [0x6aaecc], eax
mov dword [0x6ab010], 0
mov eax, dword [0xa26310]
test eax, eax
jne 0x4a5966
cmp dword [ebp - 0x1c], 0
jne 0x4a5969
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.0044c31e
cmp dword [ebp - 0x8c], eax
setne al
test al, al
je 0x4a5fb3
mov dword [esp], 0x30d4b
call fcn.0044c31e
test eax, eax
setne al
test al, al
je 0x4a5f9b
mov dword [esp], 0x30d4b
call fcn.0044c67d
jmp 0x4a5fa7
mov dword [esp], 0x30d4b
call fcn.0044c58b
mov dword [ebp - 0x78], 0xffffffff
call fcn.004a81f7
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.0044c31e
cmp dword [ebp - 0x90], eax
setne al
test al, al
je 0x4a6046
mov dword [esp], 0x187cd
call fcn.0044c31e
test eax, eax
setne al
test al, al
je 0x4a601d
mov dword [0x6a0868], 0x12d
mov dword [esp], 0x187cd
call fcn.0044c955
jmp 0x4a603a
mov dword [0x6a0868], 0x12d
mov dword [esp], 0x187cd
mov dword [ebp - 0x78], 0xffffffff
call fcn.0044c89a
mov dword [ebp - 0x78], 0xffffffff
call fcn.004a81f7
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.0044c31e
cmp dword [ebp - 0x94], eax
setne al
test al, al
je 0x4a60d9
mov dword [esp], 0x187cc
call fcn.0044c31e
test eax, eax
setne al
test al, al
je 0x4a60b0
mov dword [0x6a0868], 0x12c
mov dword [esp], 0x187cc
call fcn.0044c955
jmp 0x4a60cd
mov dword [0x6a0868], 0x12c
mov dword [esp], 0x187cc
mov dword [ebp - 0x78], 0xffffffff
call fcn.0044c89a
mov dword [ebp - 0x78], 0xffffffff
call fcn.004a81f7
mov eax, dword [0xa26310]
test eax, eax
jmp 0x4a5969
nop
mov byte [0x57b299], 1
mov dword [0x57b294], 1
jmp 0x4a6111
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 [0x6a087c]
cmp eax, 3
setne al
test al, al
jne 0x4a60f9
mov eax, dword [0x6a0890]
test eax, eax
je 0x4a6136
mov eax, dword [0x6a0884]
mov dword [esp], eax
call fcn.0048de91
mov dword [esp + 4], 0
mov dword [esp], 0
mov dword [ebp - 0x78], 0xffffffff
call fcn.0046f03f
mov eax, dword [0x68bb4c]
test eax, eax
jne 0x4a615f
call fcn.00479555
mov eax, dword [0x68bb4c]
test eax, eax
je 0x4a61c6
mov dword [esp + 4], 0x54a172
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 0x4a61ba
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 [0x690838]
mov edx, dword [0x69083c]
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.004be950