Function at 0x500209
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
push ebx
push esi
push edi
mov edi, ecx
mov esi, edx
cmp dword [edi], 0
je 0x500223
push 0xfffffffffffffffb
pop eax
jmp 0x50053e
cmp dword [edi + 8], 0
je 0x50022d
push 0xfffffffffffffffa
jmp 0x50021d
test esi, esi
je 0x50053c
mov eax, dword [ebp + 8]
test eax, eax
jle 0x50053c
cdq
and edx, 0x7f
lea ebx, [edx + eax]
mov eax, dword [edi + 4]
sar ebx, 7
mov dword [ebp - 0x18], ebx
sub eax, 0
je 0x50050c
dec eax
je 0x500486
dec eax
je 0x50026b
or eax, 0xffffffff
jmp 0x50053e
mov eax, dword [edi + 0xc]
mov dword [ebp - 0x2c], eax
mov eax, dword [edi + 0x10]
mov dword [ebp - 0x28], eax
mov eax, dword [edi + 0x14]
mov dword [ebp - 0x24], eax
mov eax, dword [edi + 0x18]
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], ebx
test ebx, ebx
jle 0x500535
mov al, byte [ebp - 0x1d]
mov byte [ebp - 0x10], al
mov al, byte [ebp - 0x1e]
mov byte [ebp - 0xf], al
mov al, byte [ebp - 0x1f]
mov byte [ebp - 0xe], al
mov al, byte [ebp - 0x20]
mov byte [ebp - 0xd], al
mov al, byte [ebp - 0x21]
mov byte [ebp - 0xc], al
mov al, byte [ebp - 0x22]
mov byte [ebp - 0xb], al
mov al, byte [ebp - 0x23]
mov byte [ebp - 0xa], al
mov al, byte [ebp - 0x24]
mov byte [ebp - 9], al
mov al, byte [ebp - 0x25]
mov byte [ebp - 8], al
mov al, byte [ebp - 0x26]
mov byte [ebp - 7], al
mov al, byte [ebp - 0x27]
mov byte [ebp - 6], al
mov al, byte [ebp - 0x28]
mov byte [ebp - 5], al
mov al, byte [ebp - 0x29]
mov byte [ebp - 4], al
mov al, byte [ebp - 0x2a]
mov byte [ebp - 3], al
mov al, byte [ebp - 0x2b]
mov byte [ebp - 2], al
mov al, byte [ebp - 0x2c]
mov byte [ebp - 1], al
mov esi, dword [ebp + 0xc]
xor ebx, ebx
mov dword [ebp - 0x14], ebx
mov eax, dword [ebp - 0x2c]
mov ecx, edi
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x30], eax
lea eax, [ebp - 0x3c]
push eax
mov edx, eax
call fcn.00500b44
mov eax, dword [ebp - 0x14]
and bl, 7
cdq
and edx, 7
add eax, edx
mov dl, byte [ebp - 0x3c]
sar eax, 3
and dl, 0x80
pop ecx
mov cl, bl
shr dl, cl
xor byte [eax + esi], dl
mov dl, byte [eax + esi]
mov ah, byte [ebp - 2]
mov cl, byte [ebp - 1]
mov al, ah
shr al, 7
add cl, cl
or cl, al
add ah, ah
mov byte [ebp - 1], cl
mov byte [ebp - 0x2c], cl
mov cl, byte [ebp - 3]
mov al, cl
add cl, cl
shr al, 7
or ah, al
mov byte [ebp - 2], ah
mov byte [ebp - 0x2b], ah
mov ah, byte [ebp - 4]
mov al, ah
add ah, ah
shr al, 7
or cl, al
mov byte [ebp - 3], cl
mov byte [ebp - 0x2a], cl
mov cl, byte [ebp - 5]
mov al, cl
add cl, cl
shr al, 7
or ah, al
mov byte [ebp - 4], ah
mov byte [ebp - 0x29], ah
mov ah, byte [ebp - 6]
mov al, ah
add ah, ah
shr al, 7
or cl, al
mov byte [ebp - 5], cl
mov byte [ebp - 0x28], cl
mov cl, byte [ebp - 7]
mov al, cl
add cl, cl
shr al, 7
or ah, al
mov byte [ebp - 6], ah
mov byte [ebp - 0x27], ah
mov ah, byte [ebp - 8]
mov al, ah
add ah, ah
shr al, 7
or cl, al
mov byte [ebp - 7], cl
mov byte [ebp - 0x26], cl
mov cl, byte [ebp - 9]
mov al, cl
shr al, 7
or ah, al
mov byte [ebp - 8], ah
add cl, cl
mov byte [ebp - 0x25], ah
mov ah, byte [ebp - 0xa]
mov al, ah
mov dh, byte [ebp - 0xe]
shr al, 7
add ah, ah
or cl, al
mov ch, byte [ebp - 0xf]
mov byte [ebp - 9], cl
mov byte [ebp - 0x24], cl
mov cl, byte [ebp - 0xb]
mov al, cl
add cl, cl
shr al, 7
or ah, al
mov byte [ebp - 0xa], ah
mov byte [ebp - 0x23], ah
mov ah, byte [ebp - 0xc]
mov al, ah
add ah, ah
shr al, 7
or cl, al
mov byte [ebp - 0xb], cl
mov byte [ebp - 0x22], cl
mov cl, byte [ebp - 0xd]
mov al, cl
add cl, cl
shr al, 7
or ah, al
mov al, dh
shr al, 7
add dh, dh
or cl, al
mov byte [ebp - 0xc], ah
mov al, ch
mov byte [ebp - 0xd], cl
shr al, 7
add ch, ch
mov byte [ebp - 0x20], cl
or dh, al
mov byte [ebp - 0x21], ah
mov cl, 7
mov ah, byte [ebp - 0x10]
sub cl, bl
mov ebx, dword [ebp - 0x14]
mov al, ah
shr dl, cl
add ah, ah
shr al, 7
and dl, 1
or ch, al
mov byte [ebp - 0xe], dh
or ah, dl
mov byte [ebp - 0x1f], dh
inc ebx
mov byte [ebp - 0xf], ch
mov byte [ebp - 0x1e], ch
mov byte [ebp - 0x10], ah
mov byte [ebp - 0x1d], ah
mov dword [ebp - 0x14], ebx
cmp ebx, 0x80
jl 0x5002f6
mov esi, dword [ebp - 0x1c]
dec esi
mov dword [ebp - 0x1c], esi
test esi, esi
jg 0x5002ee
jmp 0x500532
mov eax, dword [edi + 0xc]
lea edx, [ebp - 0x3c]
xor eax, dword [esi]
push dword [ebp + 0xc]
mov dword [ebp - 0x3c], eax
mov eax, dword [edi + 0x10]
xor eax, dword [esi + 4]
mov dword [ebp - 0x38], eax
mov eax, dword [edi + 0x14]
xor eax, dword [esi + 8]
mov dword [ebp - 0x34], eax
mov eax, dword [edi + 0x18]
xor eax, dword [esi + 0xc]
mov dword [ebp - 0x30], eax
call fcn.00500b44
lea eax, [ebx - 1]
add esi, 0x10
mov dword [ebp - 0x1c], eax
pop ecx
test eax, eax
jle 0x500535
mov ebx, dword [ebp + 0xc]
add ebx, 8
mov eax, dword [ebx - 8]
lea edx, [ebp - 0x3c]
xor eax, dword [esi]
mov ecx, edi
mov dword [ebp - 0x3c], eax
mov eax, dword [ebx - 4]
xor eax, dword [esi + 4]
mov dword [ebp - 0x38], eax
mov eax, dword [esi + 8]
xor eax, dword [ebx]
lea ebx, [ebx + 0x10]
mov dword [ebp - 0x34], eax
mov eax, dword [ebx - 0xc]
xor eax, dword [esi + 0xc]
mov dword [ebp - 0x30], eax
lea eax, [ebx - 8]
push eax
call fcn.00500b44
mov eax, dword [ebp - 0x1c]
lea esi, [esi + 0x10]
dec eax
mov dword [ebp - 0x1c], eax
pop ecx
test eax, eax
jg 0x5004c8
jmp 0x500532
mov dword [ebp - 0x1c], ebx
test ebx, ebx
jle 0x500535
mov ebx, dword [ebp + 0xc]
sub esi, ebx
push ebx
lea edx, [esi + ebx]
mov ecx, edi
call fcn.00500b44
mov eax, dword [ebp - 0x1c]
add ebx, 0x10
dec eax
mov dword [ebp - 0x1c], eax
pop ecx
test eax, eax
jg 0x500518
mov ebx, dword [ebp - 0x18]
shl ebx, 7
mov eax, ebx
jmp 0x50053e
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret