Function at 0x4cb940
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x58
mov edx, dword [ebp + 8]
xor ecx, ecx
push ebx
push esi
push edi
mov eax, dword [edx]
xor ebx, ebx
mov dword [ebp - 0x28], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x10], 0
mov esi, dword [eax]
mov ecx, dword [eax + 4]
inc esi
mov edi, dword [eax + 0x10]
push esi
push dword [edx + 0xc]
mov dword [ebp + 0xc], ecx
mov ecx, dword [eax + 0x14]
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x58], edi
mov dword [ebp - 0xc], ecx
mov dword [ebp - 0x54], ecx
call fcn.004a04c0
mov ecx, dword [ebp + 8]
add esp, 8
mov dword [ebp - 8], eax
mov ecx, dword [ecx + 0xc]
push esi
push ecx
test eax, eax
jne 0x4cb9b1
call fcn.004a0d80
add esp, 8
sub eax, 5
neg eax
sbb eax, eax
pop edi
pop esi
and eax, 7
pop ebx
mov esp, ebp
pop ebp
ret
call fcn.004a0680
mov ecx, dword [ebp - 0x28]
mov edx, eax
mov dword [ebp - 0x38], edx
mov ecx, dword [ecx + 0x24]
mov eax, dword [ecx]
mov dword [ebp - 0x30], eax
lea eax, [ebp - 0x2c]
push eax
mov eax, dword [ebp + 8]
push edx
push dword [ebp - 8]
push dword [eax + 0x14]
push ecx
call fcn.004f9b10
add esp, 0x1c
test eax, eax
jne 0x4cbd4c
lea eax, [ebp - 0x10]
mov dword [ebp - 0x34], 0xffffffff
push eax
lea eax, [ebp - 0x20]
mov dword [ebp - 0x14], 0
push eax
lea eax, [ebp - 0x14]
mov dword [ebp - 0x20], 0
push eax
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0x4c]
push eax
mov eax, dword [ebp - 0x30]
push dword [ebp - 0x2c]
mov eax, dword [eax + 0x14]
call eax
mov esi, eax
add esp, 0x18
test esi, esi
jne 0x4cbd21
mov ecx, dword [ebp + 0xc]
cmp dword [ebp - 0x10], ecx
jl 0x4cb9e5
test ebx, ebx
jne 0x4cbc52
mov eax, dword [ebp - 0x38]
sub eax, dword [ebp - 0x14]
mov ebx, dword [ebp - 0xc]
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 8]
add eax, dword [ebp - 0x14]
mov dword [ebp - 0x40], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x14]
mov dword [ebp - 0x44], eax
mov eax, edi
or eax, ebx
je 0x4cbc01
mov eax, edi
mov dword [ebp - 0x1c], esi
and eax, 1
or eax, esi
jne 0x4cba93
nop word [eax + eax]
inc esi
xor edx, edx
xor ecx, ecx
mov eax, esi
bts edx, eax
cmp eax, 0x20
cmovae ecx, edx
xor edx, ecx
cmp eax, 0x40
cmovae ecx, edx
and edx, edi
and ecx, ebx
or edx, ecx
je 0x4cba70
mov dword [ebp - 0x1c], esi
mov edi, dword [ebp + 0x18]
xor edx, edx
dec edi
xor ecx, ecx
mov eax, edi
xor ebx, ebx
bts edx, eax
cmp eax, 0x20
cmovae ecx, edx
xor edx, ecx
cmp eax, 0x40
cmovae ecx, edx
and edx, dword [ebp - 0x18]
and ecx, dword [ebp - 0xc]
or edx, ecx
jne 0x4cbae5
mov esi, dword [ebp - 0x18]
nop dword [eax]
dec edi
xor edx, edx
xor ecx, ecx
mov eax, edi
bts edx, eax
inc ebx
cmp eax, 0x20
cmovae ecx, edx
xor edx, ecx
cmp eax, 0x40
cmovae ecx, edx
and edx, esi
and ecx, dword [ebp - 0xc]
or edx, ecx
je 0x4cbac0
mov esi, dword [ebp - 0x1c]
sub esi, ebx
mov eax, esi
cdq
sub eax, edx
sar eax, 1
mov dword [ebp - 0x48], eax
test eax, eax
jle 0x4cbc01
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x1c], 0
mov dword [ebp - 4], 0
mov ebx, dword [eax + 0x24]
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x3c]
mov edi, dword [ebx]
push dword [ebp - 0x40]
push ebx
mov eax, dword [edi + 0xc]
call eax
mov esi, eax
add esp, 0x10
test esi, esi
jne 0x4cbb58
mov eax, dword [ebp - 4]
mov dword [eax], ebx
cmp dword [edi], 1
jl 0x4cbb58
push dword [ebp - 0x44]
mov eax, dword [edi + 0x18]
push dword [ebp - 4]
call eax
mov esi, eax
add esp, 8
test esi, esi
je 0x4cbb58
push dword [ebp - 4]
mov eax, dword [edi + 0x10]
call eax
add esp, 4
xor ebx, ebx
mov dword [ebp - 4], ebx
jmp 0x4cbb5b
mov ebx, dword [ebp - 4]
test esi, esi
je 0x4cbb67
mov ecx, dword [ebp + 0xc]
jmp 0x4cbc06
mov eax, dword [ebp - 0x48]
add eax, dword [ebp + 0x18]
mov dword [ebp - 0x3c], eax
cmp dword [ebp - 0x1c], eax
jge 0x4cbbb0
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x40], 0
push eax
lea eax, [ebp - 0x48]
mov dword [ebp - 0x44], 0
push eax
lea eax, [ebp - 0x44]
mov dword [ebp - 0x48], 0
push eax
lea eax, [ebp - 0x40]
push eax
lea eax, [ebp - 0x50]
push eax
mov eax, dword [edi + 0x14]
push ebx
call eax
mov esi, eax
add esp, 0x18
mov eax, dword [ebp - 0x3c]
test esi, esi
je 0x4cbb70
mov eax, dword [edi + 0x10]
push ebx
call eax
add esp, 4
test esi, esi
je 0x4cbbc7
cmp esi, 0x65
je 0x4cbbc7
mov ecx, dword [ebp + 0xc]
jmp 0x4cbc06
mov ecx, dword [ebp + 0xc]
xor eax, eax
cmp esi, 0x65
sete al
sub eax, dword [ebp + 0x18]
add eax, dword [ebp - 0x1c]
test eax, eax
jle 0x4cbc04
movq xmm1, qword [ebp - 0x58]
add ecx, eax
movd xmm0, eax
psrlq xmm1, xmm0
mov dword [ebp + 0xc], ecx
movq qword [ebp - 0x58], xmm1
mov eax, dword [ebp - 0x54]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x58]
mov dword [ebp - 0x18], eax
jmp 0x4cbc04
mov ecx, dword [ebp + 0xc]
xor esi, esi
mov ebx, 1
test esi, esi
jne 0x4cbd3c
test ecx, ecx
jg 0x4cbc29
cmp dword [ebp + 0x10], esi
jg 0x4cbc29
mov ecx, dword [ebp - 0x14]
test ecx, ecx
je 0x4cbc43
push ecx
push dword [ebp - 8]
jmp 0x4cbc2e
push 0xffffffffffffffff
push dword [ebp + 0x24]
push dword [ebp + 0x28]
call fcn.004cc580
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x4cbd3c
mov ecx, dword [ebp + 0xc]
mov edi, dword [ebp - 0x18]
cmp dword [ebp - 0x10], ecx
jl 0x4cb9e5
mov eax, dword [ebp + 0x18]
mov edx, dword [ebp - 0x10]
add eax, ecx
cmp edx, eax
jge 0x4cbd14
sub edx, ecx
xor eax, eax
xor ecx, ecx
bts ecx, edx
cmp edx, 0x20
cmovae eax, ecx
xor ecx, eax
cmp edx, 0x40
cmovae eax, ecx
and ecx, edi
and eax, dword [ebp - 0xc]
or ecx, eax
je 0x4cbc89
mov edi, 1
jmp 0x4cbc8b
xor edi, edi
mov ecx, dword [ebp + 0xc]
cmp dword [ebp - 0x10], ecx
jle 0x4cbcb2
mov eax, dword [ebp - 0x14]
sub eax, dword [ebp - 0x24]
push eax
mov eax, dword [ebp - 8]
add eax, dword [ebp - 0x24]
push eax
push dword [ebp + 0x28]
call fcn.004cc580
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x4cbd01
test edi, edi
je 0x4cbccc
push 0xffffffffffffffff
push dword [ebp + 0x1c]
push dword [ebp + 0x28]
call fcn.004cc580
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x4cbd01
mov eax, dword [ebp - 0x20]
sub eax, dword [ebp - 0x14]
push eax
mov eax, dword [ebp - 8]
add eax, dword [ebp - 0x14]
push eax
push dword [ebp + 0x28]
call fcn.004cc580
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x4cbd01
test edi, edi
je 0x4cbd01
push 0xffffffffffffffff
push dword [ebp + 0x20]
push dword [ebp + 0x28]
call fcn.004cc580
add esp, 0xc
mov esi, eax
mov eax, dword [ebp - 0x20]
mov edi, dword [ebp - 0x18]
mov dword [ebp - 0x24], eax
test esi, esi
je 0x4cb9e5
jmp 0x4cbd3c
cmp dword [ebp + 0x14], 0
je 0x4cbd3c
push 0xffffffffffffffff
push dword [ebp + 0x24]
jmp 0x4cbd2f
cmp esi, 0x65
jne 0x4cbd3c
mov eax, dword [ebp - 8]
add eax, dword [ebp - 0x24]
push 0xffffffffffffffff
push eax
push dword [ebp + 0x28]
call fcn.004cc580
mov esi, eax
add esp, 0xc
mov eax, dword [ebp - 0x30]
push dword [ebp - 0x2c]
mov eax, dword [eax + 0x10]
call eax
add esp, 4
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret