Function at 0x4028b7
Capabilities:
Encode data using xor

Disassembly:
cmp dword [0x40a408], 0
jne 0x4028cf
call fcn.004037aa
mov dword [0x40a408], 1
push ebx
mov ebx, dword [esp + 0x10]
mov eax, ebx
sub eax, 0x80
je 0x402907
sub eax, 0x40
je 0x4028fb
sub eax, 0x40
je 0x4028ef
push 0xffffffffffffffe0
pop eax
jmp 0x402b21
mov edx, dword [esp + 8]
mov dword [edx], 0xe
jmp 0x402911
mov edx, dword [esp + 8]
mov dword [edx], 0xc
jmp 0x402911
mov edx, dword [esp + 8]
mov dword [edx], 0xa
push ebp
push esi
push edi
shr ebx, 5
lea edi, [edx + 8]
xor ebp, ebp
mov dword [edx + 4], edi
test ebx, ebx
je 0x402959
mov esi, dword [esp + 0x18]
mov edx, ebp
add esi, 2
movzx ecx, byte [esi + 1]
movzx eax, byte [esi]
lea esi, [esi + 4]
shl ecx, 8
or ecx, eax
movzx eax, byte [esi - 5]
shl ecx, 8
or ecx, eax
movzx eax, byte [esi - 6]
shl ecx, 8
or ecx, eax
mov dword [edi + edx*4], ecx
inc edx
cmp edx, ebx
jb 0x40292c
mov edx, dword [esp + 0x14]
mov eax, dword [edx]
sub eax, 0xa
je 0x402ab5
dec eax
dec eax
je 0x402a3c
dec eax
dec eax
jne 0x402b1c
mov ebx, dword [edi + 0x1c]
movzx eax, bl
mov edx, dword [edi + 0xc]
movzx ecx, byte [eax + 0x40a410]
movzx eax, byte [edi + 0x1f]
shl ecx, 8
movzx eax, byte [eax + 0x40a410]
xor ecx, eax
movzx eax, byte [edi + 0x1e]
shl ecx, 8
movzx eax, byte [eax + 0x40a410]
xor ecx, eax
movzx eax, byte [edi + 0x1d]
shl ecx, 8
movzx eax, byte [eax + 0x40a410]
xor ecx, eax
mov eax, dword [edi + 4]
xor ecx, dword [ebp + 0x40c610]
add ebp, 4
xor ecx, dword [edi]
lea edi, [edi + 0x20]
xor eax, ecx
mov dword [edi], ecx
mov ecx, dword [edi - 0x18]
xor ecx, eax
mov dword [edi + 4], eax
xor edx, ecx
mov dword [edi + 8], ecx
mov dword [edi + 0xc], edx
movzx eax, byte [edi + 0xf]
movzx ecx, byte [eax + 0x40a410]
movzx eax, byte [edi + 0xe]
shl ecx, 8
movzx eax, byte [eax + 0x40a410]
xor ecx, eax
movzx eax, byte [edi + 0xd]
shl ecx, 8
movzx eax, byte [eax + 0x40a410]
xor ecx, eax
movzx eax, dl
shl ecx, 8
movzx eax, byte [eax + 0x40a410]
xor ecx, eax
mov eax, dword [edi - 0xc]
xor ecx, dword [edi - 0x10]
xor eax, ecx
mov dword [edi + 0x10], ecx
mov ecx, dword [edi - 8]
xor ecx, eax
mov dword [edi + 0x14], eax
mov dword [edi + 0x18], ecx
xor ecx, ebx
mov dword [edi + 0x1c], ecx
cmp ebp, 0x1c
jb 0x402974
jmp 0x402b1c
mov ebx, dword [edi + 0x14]
movzx eax, bl
movzx ecx, byte [eax + 0x40a410]
movzx eax, byte [edi + 0x17]
shl ecx, 8
movzx eax, byte [eax + 0x40a410]
xor ecx, eax
movzx eax, byte [edi + 0x16]
shl ecx, 8
movzx eax, byte [eax + 0x40a410]
xor ecx, eax
movzx eax, byte [edi + 0x15]
shl ecx, 8
movzx eax, byte [eax + 0x40a410]
xor ecx, eax
mov eax, dword [edi + 4]
xor ecx, dword [ebp + 0x40c610]
add ebp, 4
xor ecx, dword [edi]
lea edi, [edi + 0x18]
xor eax, ecx
mov dword [edi], ecx
mov ecx, dword [edi - 0x10]
xor ecx, eax
mov dword [edi + 4], eax
mov eax, dword [edi - 0xc]
xor eax, ecx
mov dword [edi + 8], ecx
mov ecx, dword [edi - 8]
xor ecx, eax
mov dword [edi + 0xc], eax
mov dword [edi + 0x10], ecx
xor ecx, ebx
mov dword [edi + 0x14], ecx
cmp ebp, 0x20
jb 0x402a3c
jmp 0x402b1c
mov ebx, dword [edi + 0xc]
movzx eax, bl
movzx ecx, byte [eax + 0x40a410]
movzx eax, byte [edi + 0xf]
shl ecx, 8
movzx eax, byte [eax + 0x40a410]
xor ecx, eax
movzx eax, byte [edi + 0xe]
shl ecx, 8
movzx eax, byte [eax + 0x40a410]
xor ecx, eax
movzx eax, byte [edi + 0xd]
shl ecx, 8
movzx eax, byte [eax + 0x40a410]
xor ecx, eax
mov eax, dword [edi + 4]
xor ecx, dword [ebp + 0x40c610]
add ebp, 4
xor ecx, dword [edi]
lea edi, [edi + 0x10]
xor eax, ecx
mov dword [edi], ecx
mov ecx, dword [edi - 8]
xor ecx, eax
mov dword [edi + 4], eax
mov dword [edi + 8], ecx
xor ecx, ebx
mov dword [edi + 0xc], ecx
cmp ebp, 0x28
jb 0x402ab5
pop edi
pop esi
xor eax, eax
pop ebp
pop ebx
ret 0xc