Function at 0x1004bdf0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
mov ebx, dword [ebp + 8]
xor ecx, ecx
push esi
mov esi, dword [ebp + 0x18]
mov eax, dword [ebx + 0x154]
mov edx, dword [ebx + 0x150]
mov dword [ebp - 0x10], eax
mov eax, esi
add eax, dword [ebx + 0x38]
mov dword [ebp - 0xc], edx
adc ecx, dword [ebx + 0x3c]
cmp ecx, 0xf
ja 0x1004bff1
jb 0x1004be2e
cmp eax, 0xffffffe0
ja 0x1004bff1
cmp dword [ebx + 0x164], 0
mov dword [ebx + 0x38], eax
lea eax, [ebx + 0x40]
mov dword [ebx + 0x3c], ecx
lea ecx, [ebx + 0x50]
je 0x1004be54
push ecx
push eax
call edx
add esp, 8
mov dword [ebx + 0x164], 0
mov ecx, dword [ebx + 0x160]
mov eax, dword [ebp + 0x14]
mov dword [ebp - 4], ecx
mov dword [ebp + 0x18], eax
push edi
mov edi, dword [ebp + 0x10]
test ecx, ecx
je 0x1004bec5
nop dword [eax + eax]
test esi, esi
je 0x1004beb3
mov al, byte [ecx + ebx + 0x10]
add ecx, ebx
mov dl, byte [edi]
dec esi
mov ebx, dword [ebp + 0x18]
xor al, dl
inc dword [ebp + 0x18]
inc edi
mov dword [ebp - 8], edi
mov byte [ebx], al
xor byte [ecx + 0x40], dl
mov ecx, dword [ebp - 4]
mov ebx, dword [ebp + 8]
inc ecx
and ecx, 0xf
mov dword [ebp - 4], ecx
jne 0x1004be70
lea eax, [ebx + 0x50]
push eax
lea eax, [ebx + 0x40]
push eax
call dword [ebp - 0xc]
mov eax, dword [ebp - 4]
add esp, 8
mov dword [ebp - 4], eax
jmp 0x1004bec8
pop edi
pop esi
mov dword [ebx + 0x160], ecx
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [ebp - 8], edi
mov ecx, dword [ebx + 0xc]
bswap ecx
mov dword [ebp - 0xc], ecx
cmp esi, 0xc00
jb 0x1004bf38
mov eax, 0xaaaaaaab
mul esi
shr edx, 0xb
mov dword [ebp - 8], edx
push 0xc00
push edi
lea eax, [ebx + 0x50]
push eax
lea eax, [ebx + 0x40]
push eax
call dword [ebp - 0x10]
push ebx
push dword [ebp + 0xc]
push 0xc0
push dword [ebp + 0x18]
push edi
call dword [ebp + 0x1c]
mov ecx, dword [ebp - 0xc]
add esp, 0x24
add dword [ebp + 0x18], 0xc00
add ecx, 0xc0
mov eax, ecx
mov dword [ebp - 0xc], ecx
bswap eax
add edi, 0xc00
mov dword [ebx + 0xc], eax
sub esi, 0xc00
sub dword [ebp - 8], 1
jne 0x1004bee5
mov dword [ebp - 8], edi
mov eax, esi
and eax, 0xfffffff0
mov dword [ebp - 0x14], eax
je 0x1004bf81
push eax
push dword [ebp - 8]
mov edi, eax
lea eax, [ebx + 0x50]
push eax
lea eax, [ebx + 0x40]
shr edi, 4
push eax
call dword [ebp - 0x10]
push ebx
push dword [ebp + 0xc]
push edi
push dword [ebp + 0x18]
push dword [ebp - 8]
call dword [ebp + 0x1c]
mov eax, dword [ebp - 0xc]
add esp, 0x24
add eax, edi
mov edi, dword [ebp - 8]
mov dword [ebp - 0xc], eax
bswap eax
mov dword [ebx + 0xc], eax
mov eax, dword [ebp - 0x14]
add edi, eax
add dword [ebp + 0x18], eax
sub esi, eax
test esi, esi
je 0x1004bfdc
push dword [ebp + 0xc]
lea eax, [ebx + 0x10]
push eax
mov eax, dword [ebx + 0x158]
push ebx
call eax
mov eax, dword [ebp - 0xc]
add esp, 0xc
mov ecx, dword [ebp + 0x18]
inc eax
bswap eax
mov dword [ebx + 0xc], eax
sub edi, ecx
mov eax, dword [ebp - 4]
add eax, ecx
mov dword [ebp + 0x18], eax
mov eax, dword [ebp - 4]
lea edx, [eax + 0x40]
add edx, ebx
mov ebx, dword [ebp + 0x18]
add eax, esi
mov dword [ebp - 4], eax
nop
mov cl, byte [edi + ebx]
lea edx, [edx + 1]
mov al, byte [edx - 0x31]
lea ebx, [ebx + 1]
xor byte [edx - 1], cl
xor al, cl
mov byte [ebx - 1], al
sub esi, 1
jne 0x1004bfc0
mov ebx, dword [ebp + 8]
mov eax, dword [ebp - 4]
pop edi
mov dword [ebx + 0x160], eax
mov eax, 1
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret