Function at 0x10027f80
Capabilities:
Encode data using xor
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x54
push edi
mov edi, dword [ebp + 8]
xor eax, eax
cmp edi, eax
je 0x10028175
cmp dword [ebp + 0xc], eax
je 0x10028175
push ebx
mov dword [ebp - 4], eax
mov dword [ebp - 0x54], eax
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x4c], eax
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], eax
push esi
lea eax, [ebp - 0x54]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov esi, dword [ebp - 0x4c]
push 0x1c
lea ecx, [ebp - 0x30]
push ecx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_VirtualQueryEx]
cmp eax, 0x1c
jne 0x10028156
cmp esi, dword [ebp - 0x48]
ja 0x10028156
mov eax, dword [ebp - 0x1c]
test al, 0xee
je 0x10028133
test eax, 0x101
jne 0x10028133
mov edi, dword [ebp - 0x24]
push edi
call dword [sym.imp.MSVCR100.dll_malloc]
add esp, 4
lea edx, [ebp - 4]
push edx
mov ebx, eax
mov eax, dword [ebp + 8]
push edi
push ebx
push esi
push eax
mov dword [ebp - 0x14], ebx
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
cmp eax, 1
jne 0x10028126
mov ecx, dword [ebp - 0x24]
cmp dword [ebp - 4], ecx
jne 0x10028126
xor eax, eax
test ecx, ecx
je 0x1002805f
xor byte [eax + ebx], 0x12
mov ecx, dword [ebp - 0x24]
inc eax
cmp eax, ecx
jb 0x10028053
xor eax, eax
mov dword [ebp - 0xc], eax
test ecx, ecx
je 0x10028126
lea esp, [esp]
xor edi, edi
cmp dword [ebp + 0x10], edi
jbe 0x1002811a
mov edx, dword [ebp + 0xc]
add eax, ebx
mov dword [ebp - 0x10], eax
mov dword [ebp - 8], edx
mov ecx, dword [ebp + 0x14]
mov ecx, dword [ecx + edi*4]
mov esi, dword [ebp - 0x10]
cmp ecx, 4
jb 0x100280a8
mov eax, dword [esi]
cmp eax, dword [edx]
jne 0x100280b0
sub ecx, 4
add edx, 4
add esi, 4
cmp ecx, 4
jae 0x10028094
test ecx, ecx
je 0x10028166
movzx eax, byte [esi]
movzx ebx, byte [edx]
sub eax, ebx
jne 0x100280f3
cmp ecx, 1
jbe 0x10028166
movzx eax, byte [esi + 1]
movzx ebx, byte [edx + 1]
sub eax, ebx
jne 0x100280f3
cmp ecx, 2
jbe 0x10028166
movzx eax, byte [esi + 2]
movzx ebx, byte [edx + 2]
sub eax, ebx
jne 0x100280f3
cmp ecx, 3
jbe 0x10028166
movzx eax, byte [esi + 3]
movzx ecx, byte [edx + 3]
sub eax, ecx
sar eax, 0x1f
or eax, 1
je 0x10028166
mov edx, dword [ebp - 8]
inc edi
add edx, 0xc8
mov dword [ebp - 8], edx
cmp edi, dword [ebp + 0x10]
jb 0x10028086
mov ebx, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x24]
mov eax, dword [ebp - 0xc]
inc eax
mov dword [ebp - 0xc], eax
cmp eax, ecx
jb 0x10028070
push ebx
call dword [sym.imp.MSVCR100.dll_free]
mov edi, dword [ebp + 8]
add esp, 4
mov eax, dword [ebp - 0x24]
test eax, eax
je 0x10028156
mov esi, dword [ebp - 0x30]
add esi, eax
push 0x1c
lea eax, [ebp - 0x30]
push eax
push esi
push edi
call dword [sym.imp.KERNEL32.dll_VirtualQueryEx]
cmp eax, 0x1c
je 0x10027ff6
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop esi
pop ebx
xor al, al
pop edi
mov esp, ebp
pop ebp
ret
pop esi
pop ebx
mov dword [0x101609b4], edi
mov al, 1
pop edi
mov esp, ebp
pop ebp
ret
xor al, al
pop edi
mov esp, ebp
pop ebp
ret