Function at 0x4b9d40
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [0x538cc8]
mov edx, dword [ebp + 0x1c]
push ebx
mov ebx, dword [ebp + 0x10]
mov dword [ebp - 4], ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0x18]
test eax, eax
je 0x4b9d92
mov ecx, dword [ebp + 0xc]
cmp dword [eax + 0x24], edx
jne 0x4b9d8b
cmp dword [eax + 0x14], edi
jne 0x4b9d8b
cmp dword [eax], esi
jne 0x4b9d8b
cmp dword [eax + 0x28], ecx
jne 0x4b9d8b
cmp dword [eax + 0x18], ebx
jne 0x4b9d8b
mov edx, dword [ebp + 0x14]
cmp dword [eax + 0x1c], edx
mov edx, dword [ebp + 0x1c]
je 0x4ba034
mov eax, dword [eax + 0x2c]
test eax, eax
jne 0x4b9d64
xor edi, edi
cmp esi, 8
ja 0x4ba01f
test ebx, ebx
js 0x4ba01f
mov ebx, 1
mov ecx, esi
shl ebx, cl
mov dword [ebp - 0xc], ebx
cmp dword [ebp - 4], ebx
jge 0x4ba01f
mov eax, dword [ebp + 0x14]
test eax, eax
jle 0x4ba01f
cmp eax, ebx
jge 0x4ba01f
mov ecx, dword [ebp + 0x18]
test ecx, ecx
js 0x4ba01f
cmp ecx, ebx
jge 0x4ba01f
test edx, edx
js 0x4ba01f
mov eax, ebx
sub eax, ecx
dec eax
cmp edx, eax
jge 0x4ba01f
push 0x30
push 1
call fcn.004c8b6f
mov edi, eax
add esp, 8
test edi, edi
je 0x4ba01f
mov eax, dword [ebp + 0x1c]
lea ecx, [ebx - 1]
push ebx
mov dword [edi], esi
mov dword [edi + 4], ecx
mov dword [edi + 0x24], eax
call fcn.004c82f6
add esp, 4
mov dword [edi + 8], eax
test eax, eax
jne 0x4b9e3b
push edi
call fcn.004c5b14
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [edi + 4]
inc eax
push eax
call fcn.004c82f6
mov ecx, eax
add esp, 4
mov dword [edi + 0xc], ecx
test ecx, ecx
jne 0x4b9e6b
push dword [edi + 8]
call fcn.004c5b14
push edi
call fcn.004c5b14
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov al, byte [edi + 4]
mov ebx, 1
mov byte [ecx], al
mov ecx, dword [edi + 4]
mov eax, dword [edi + 8]
mov byte [ecx + eax], 0
xor ecx, ecx
mov dword [ebp - 8], ecx
cmp dword [edi + 4], ecx
jle 0x4b9ee3
nop dword [eax]
mov eax, dword [edi + 0xc]
mov byte [ebx + eax], cl
mov eax, dword [edi + 8]
mov byte [ecx + eax], bl
add ebx, ebx
mov ecx, dword [ebp - 0xc]
mov edx, ebx
and ecx, ebx
xor ebx, dword [ebp + 0xc]
test ecx, ecx
mov ecx, dword [ebp - 8]
cmove ebx, edx
inc ecx
and ebx, dword [edi + 4]
mov dword [ebp - 8], ecx
cmp ecx, dword [edi + 4]
jl 0x4b9e90
cmp ebx, 1
je 0x4b9ee3
push dword [edi + 8]
call fcn.004c5b14
push dword [edi + 0xc]
call fcn.004c5b14
push edi
call fcn.004c5b14
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 0x18]
inc eax
push eax
call fcn.004c82f6
mov ebx, eax
add esp, 4
mov dword [edi + 0x10], ebx
test ebx, ebx
je 0x4b9ec1
mov eax, dword [ebp + 0x14]
mov ecx, 1
mov dword [edi + 0x1c], eax
xor edx, edx
mov eax, dword [ebp + 0x18]
mov dword [edi + 0x14], eax
mov eax, dword [ebp + 0xc]
mov dword [edi + 0x28], eax
mov eax, ecx
div dword [ebp + 0x14]
mov esi, dword [ebp - 4]
mov dword [edi + 0x18], esi
test edx, edx
je 0x4b9f33
mov esi, dword [edi + 4]
add ecx, esi
mov eax, ecx
cdq
idiv dword [ebp + 0x14]
test edx, edx
jne 0x4b9f24
mov esi, dword [ebp - 4]
mov eax, ecx
imul esi, dword [ebp + 0x14]
cdq
xor ecx, ecx
idiv dword [ebp + 0x14]
mov dword [ebp - 0xc], ecx
mov dword [edi + 0x20], eax
mov byte [ebx], 1
mov ebx, dword [ebp + 0x18]
mov dword [ebp - 4], esi
test ebx, ebx
jle 0x4ba004
mov eax, dword [edi + 0x10]
mov edx, ecx
mov dword [ebp - 8], ecx
mov byte [eax + ecx + 1], 1
test ecx, ecx
je 0x4b9fb3
mov ebx, dword [edi + 0x10]
add ebx, edx
mov al, byte [ebx]
test al, al
je 0x4b9fa6
movzx ecx, al
mov eax, dword [edi + 0xc]
movzx eax, byte [ecx + eax]
add eax, esi
mov esi, dword [edi + 4]
cmp eax, esi
jl 0x4b9f98
mov ecx, dword [edi]
sub eax, esi
mov edx, eax
and eax, esi
sar edx, cl
add eax, edx
cmp eax, esi
jge 0x4b9f85
mov edx, dword [ebp - 8]
mov ecx, dword [edi + 8]
mov esi, dword [ebp - 4]
mov al, byte [eax + ecx]
xor al, byte [ebx - 1]
jmp 0x4b9fa9
mov al, byte [ebx - 1]
dec edx
mov byte [ebx], al
mov dword [ebp - 8], edx
test edx, edx
jg 0x4b9f67
mov eax, dword [edi + 0x10]
mov ebx, dword [edi + 4]
movzx ecx, byte [eax]
mov eax, dword [edi + 0xc]
movzx esi, byte [ecx + eax]
add esi, dword [ebp - 4]
cmp esi, ebx
jl 0x4b9fde
mov ecx, dword [edi]
nop dword [eax]
sub esi, ebx
mov edx, esi
and esi, ebx
sar edx, cl
add esi, edx
cmp esi, ebx
jge 0x4b9fd0
mov eax, dword [edi + 8]
mov ecx, dword [edi + 0x10]
mov ebx, dword [ebp + 0x18]
mov al, byte [esi + eax]
mov esi, dword [ebp - 4]
add esi, dword [ebp + 0x14]
mov byte [ecx], al
mov ecx, dword [ebp - 0xc]
inc ecx
mov dword [ebp - 4], esi
mov dword [ebp - 0xc], ecx
cmp ecx, ebx
jl 0x4b9f56
xor esi, esi
mov edx, dword [edi + 0x10]
mov eax, dword [edi + 0xc]
movzx ecx, byte [edx + esi]
mov al, byte [ecx + eax]
mov byte [edx + esi], al
inc esi
cmp esi, ebx
jle 0x4ba006
mov eax, edi
jmp 0x4ba025
mov eax, edi
test edi, edi
je 0x4ba034
mov ecx, dword [0x538cc8]
mov dword [edi + 0x2c], ecx
mov dword [0x538cc8], edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret