Function at 0x51e2f4
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffa4
push ebx
push esi
push edi
mov esi, ecx
lea edi, [ebp - 0x4c]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov dword [ebp - 4], edx
mov esi, dword [ebp + 0xc]
mov ebx, dword [ebp + 0x10]
mov eax, ebx
call fcn.00458bc0
mov ebx, eax
mov eax, esi
call fcn.00458bc0
mov esi, eax
cmp esi, ebx
jne 0x51e33c
mov eax, dword [ebp - 4]
call fcn.0045a288
lea edx, [ebp - 0x4c]
mov ecx, ebx
call fcn.0051e1b0
jmp 0x51e5cf
lea eax, [ebp - 0x4c]
push eax
call sub.user32.dll_IsRectEmpty
test eax, eax
jne 0x51e5cf
mov eax, ebx
call fcn.00408994
and eax, 0xff
mov dword [ebp - 8], eax
mov eax, ebx
call fcn.00408998
and eax, 0xff
mov dword [ebp - 0xc], eax
mov eax, ebx
call fcn.0040899c
and eax, 0xff
mov dword [ebp - 0x10], eax
mov eax, esi
call fcn.00408994
and eax, 0xff
mov dword [ebp - 0x14], eax
mov eax, esi
call fcn.00408998
and eax, 0xff
mov dword [ebp - 0x18], eax
mov eax, esi
call fcn.0040899c
and eax, 0xff
mov dword [ebp - 0x1c], eax
lea esi, [ebp - 0x4c]
lea edi, [ebp - 0x5c]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
cmp byte [ebp + 8], 0
je 0x51e3c6
mov esi, dword [ebp - 0x44]
sub esi, dword [ebp - 0x4c]
mov eax, dword [ebp - 0x5c]
inc eax
mov dword [ebp - 0x54], eax
jmp 0x51e3d3
mov esi, dword [ebp - 0x40]
sub esi, dword [ebp - 0x48]
mov eax, dword [ebp - 0x58]
inc eax
mov dword [ebp - 0x50], eax
mov eax, esi
sar eax, 1
jns 0x51e3dc
adc eax, 0
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x14]
sub eax, dword [ebp - 8]
mov edx, eax
shl eax, 4
sub eax, edx
mov ecx, 0x28
cdq
idiv ecx
add eax, dword [ebp - 8]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x18]
sub eax, dword [ebp - 0xc]
mov edx, eax
shl eax, 4
sub eax, edx
mov ecx, 0x28
cdq
idiv ecx
add eax, dword [ebp - 0xc]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x1c]
sub eax, dword [ebp - 0x10]
mov edx, eax
shl eax, 4
sub eax, edx
mov ecx, 0x28
cdq
idiv ecx
add eax, dword [ebp - 0x10]
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x20]
sub eax, dword [ebp - 8]
imul esi
cdq
idiv dword [ebp - 0x38]
add eax, dword [ebp - 8]
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x24]
sub eax, dword [ebp - 0xc]
imul esi
cdq
idiv dword [ebp - 0x38]
add eax, dword [ebp - 0xc]
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x28]
sub eax, dword [ebp - 0x10]
imul esi
cdq
idiv dword [ebp - 0x38]
add eax, dword [ebp - 0x10]
mov dword [ebp - 0x34], eax
dec esi
mov eax, dword [ebp - 0x38]
dec eax
test eax, eax
jl 0x51e4e7
inc eax
mov dword [ebp - 0x3c], eax
xor ebx, ebx
mov eax, dword [ebp - 0x34]
sub eax, dword [ebp - 0x10]
imul ebx
cdq
idiv esi
mov ecx, eax
add cl, byte [ebp - 0x10]
mov eax, dword [ebp - 0x30]
sub eax, dword [ebp - 0xc]
imul ebx
cdq
idiv esi
add al, byte [ebp - 0xc]
push eax
mov eax, dword [ebp - 0x2c]
sub eax, dword [ebp - 8]
imul ebx
cdq
idiv esi
add al, byte [ebp - 8]
pop edx
call fcn.00408978
push eax
call sub.gdi32.dll_CreateSolidBrush
mov edi, eax
push edi
lea eax, [ebp - 0x5c]
push eax
mov eax, dword [ebp - 4]
call fcn.0045a288
push eax
call sub.user32.dll_FillRect
push edi
call sub.gdi32.dll_DeleteObject
mov al, byte [ebp + 8]
xor al, 1
and eax, 0x7f
push eax
xor eax, eax
mov al, byte [ebp + 8]
push eax
lea eax, [ebp - 0x5c]
push eax
call sub.user32.dll_OffsetRect
inc ebx
dec dword [ebp - 0x3c]
jne 0x51e475
mov cl, byte [ebp - 0x28]
mov dl, byte [ebp - 0x24]
mov al, byte [ebp - 0x20]
call fcn.00408978
push eax
call sub.gdi32.dll_CreateSolidBrush
mov edi, eax
push edi
lea eax, [ebp - 0x5c]
push eax
mov eax, dword [ebp - 4]
call fcn.0045a288
push eax
call sub.user32.dll_FillRect
push edi
call sub.gdi32.dll_DeleteObject
mov al, byte [ebp + 8]
xor al, 1
and eax, 0x7f
push eax
xor eax, eax
mov al, byte [ebp + 8]
push eax
lea eax, [ebp - 0x5c]
push eax
call sub.user32.dll_OffsetRect
mov eax, dword [ebp - 0x20]
add eax, eax
sub eax, dword [ebp - 0x14]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x24]
add eax, eax
sub eax, dword [ebp - 0x18]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x28]
add eax, eax
sub eax, dword [ebp - 0x1c]
mov dword [ebp - 0x28], eax
mov ebx, dword [ebp - 0x38]
inc ebx
mov eax, esi
sub eax, ebx
jl 0x51e5cf
inc eax
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x1c]
sub eax, dword [ebp - 0x28]
imul ebx
cdq
idiv esi
mov ecx, eax
add cl, byte [ebp - 0x28]
mov eax, dword [ebp - 0x18]
sub eax, dword [ebp - 0x24]
imul ebx
cdq
idiv esi
add al, byte [ebp - 0x24]
push eax
mov eax, dword [ebp - 0x14]
sub eax, dword [ebp - 0x20]
imul ebx
cdq
idiv esi
add al, byte [ebp - 0x20]
pop edx
call fcn.00408978
push eax
call sub.gdi32.dll_CreateSolidBrush
mov edi, eax
push edi
lea eax, [ebp - 0x5c]
push eax
mov eax, dword [ebp - 4]
call fcn.0045a288
push eax
call sub.user32.dll_FillRect
push edi
call sub.gdi32.dll_DeleteObject
mov al, byte [ebp + 8]
xor al, 1
and eax, 0x7f
push eax
xor eax, eax
mov al, byte [ebp + 8]
push eax
lea eax, [ebp - 0x5c]
push eax
call sub.user32.dll_OffsetRect
inc ebx
dec dword [ebp - 0x3c]
jne 0x51e55d
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc