Function at 0x1002bdb0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x6c
mov eax, dword [0x100b5004]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, ecx
mov dword [ebp - 0x58], edx
push ebx
push esi
mov dword [ebp - 0x64], eax
mov esi, edx
movzx eax, byte [eax + edx - 1]
mov ecx, edx
sub ecx, eax
xor edx, edx
push edi
mov edi, dword [ebp + 8]
dec ecx
sub esi, edi
mov dword [ebp - 0x60], ecx
sub esi, 0x100
mov dword [ebp - 0x48], edx
mov eax, esi
sub ecx, edi
shr eax, 0x1f
lea edx, [edi - 1]
dec eax
mov dword [ebp - 0x6c], edx
and esi, eax
xor bl, bl
mov eax, ecx
mov byte [ebp - 0x49], bl
shr eax, 0x1f
dec eax
mov dword [ebp - 0x50], esi
and ecx, eax
mov eax, edx
and eax, edi
mov dword [ebp - 0x54], ecx
mov dword [ebp - 0x68], eax
jne 0x1002be23
mov eax, edi
sub eax, esi
add eax, ecx
and eax, edx
mov dword [ebp - 0x48], eax
jmp 0x1002be45
cmp edi, 0x14
jne 0x1002be32
mov eax, ecx
mov ecx, edi
sub eax, esi
add eax, edi
jmp 0x1002be3f
cmp edi, 0x30
jne 0x1002be45
mov eax, ecx
mov ecx, edi
sub eax, esi
add eax, edi
cdq
idiv ecx
mov dword [ebp - 0x48], edx
push edi
lea eax, [ebp - 0x44]
push 0
push eax
call fcn.1007d2d0
mov edx, dword [ebp - 0x58]
add esp, 0xc
cmp esi, edx
jge 0x1002bec6
lea eax, [ebp - 0x44]
mov ecx, esi
sub ecx, eax
sub eax, dword [ebp - 0x54]
mov dword [ebp - 0x5c], ecx
mov dword [ebp - 0x54], eax
nop dword [eax + eax]
xor eax, eax
test edi, edi
jle 0x1002beb5
lea ebx, [ebp - 0x44]
add ebx, eax
add ebx, ecx
cmp ebx, edx
jge 0x1002beb2
add ecx, dword [ebp - 0x54]
lea esi, [ebp - 0x44]
mov edx, dword [ebp - 0x60]
add ecx, eax
sub edx, eax
shr ecx, 0x1f
sub edx, dword [ebp - 0x50]
dec cl
dec edx
shr edx, 0x1f
dec dl
and dl, cl
mov ecx, dword [ebp - 0x64]
and dl, byte [ebx + ecx]
or byte [esi + eax], dl
inc eax
mov ecx, dword [ebp - 0x5c]
mov edx, dword [ebp - 0x58]
cmp eax, edi
jl 0x1002be76
mov esi, dword [ebp - 0x50]
add esi, edi
add ecx, edi
mov dword [ebp - 0x50], esi
mov dword [ebp - 0x5c], ecx
cmp esi, edx
jl 0x1002be70
mov bl, byte [ebp - 0x49]
cmp dword [ebp - 0x68], 0
jne 0x1002bf0a
test edi, edi
jle 0x1002bf76
mov ecx, dword [ebp - 0x48]
mov eax, dword [ebp + 0xc]
sub ecx, eax
mov edx, dword [ebp - 0x6c]
mov dword [ebp - 0x48], ecx
add ecx, eax
and ecx, edx
mov cl, byte [ebp + ecx - 0x44]
xor cl, byte [eax]
inc eax
or bl, cl
mov ecx, dword [ebp - 0x48]
sub edi, 1
jne 0x1002bee2
pop edi
pop esi
mov al, bl
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1007bc9e
mov esp, ebp
pop ebp
ret
cmp edi, 0x14
jne 0x1002bf49
mov eax, dword [ebp - 0x48]
mov esi, edi
mov ecx, dword [ebp + 0xc]
sub eax, ecx
mov dword [ebp - 0x48], eax
nop dword [eax]
add eax, ecx
cdq
idiv edi
mov al, byte [ebp + edx - 0x44]
xor al, byte [ecx]
inc ecx
or bl, al
mov eax, dword [ebp - 0x48]
sub esi, 1
jne 0x1002bf20
pop edi
pop esi
mov al, bl
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1007bc9e
mov esp, ebp
pop ebp
ret
cmp edi, 0x30
jne 0x1002bf76
mov eax, dword [ebp - 0x48]
mov esi, edi
mov ecx, dword [ebp + 0xc]
sub eax, ecx
mov dword [ebp - 0x48], eax
nop dword [eax + eax]
add eax, ecx
cdq
idiv edi
mov al, byte [ebp + edx - 0x44]
xor al, byte [ecx]
inc ecx
or bl, al
mov eax, dword [ebp - 0x48]
sub esi, 1
jne 0x1002bf60
mov ecx, dword [ebp - 4]
mov al, bl
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.1007bc9e
mov esp, ebp
pop ebp
ret