Function at 0x4c5664
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffedc
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x124], ebx
mov dword [ebp - 4], ecx
mov edi, edx
mov ebx, eax
mov esi, dword [ebp + 8]
xor eax, eax
push ebp
push 0x4c5a08
push dword fs:[eax]
mov dword fs:[eax], esp
mov edx, 1
mov eax, ebx
call fcn.004c4f00
test al, al
jne 0x4c56f0
lea eax, [ebp - 0x18]
push eax
lea edx, [ebp - 0x120]
mov eax, dword [ebx]
call fcn.004038d0
lea eax, [ebp - 0x120]
mov dword [ebp - 0x20], eax
mov byte [ebp - 0x1c], 4
lea eax, [ebp - 0x20]
push eax
lea edx, [ebp - 0x124]
mov eax, dword [0x5f4a80]
call fcn.00406a30
mov eax, dword [ebp - 0x124]
xor ecx, ecx
pop edx
call fcn.0040a85c
mov edx, dword [ebp - 0x18]
mov eax, 3
call fcn.004c4d90
mov dword [ebp - 8], edi
mov eax, dword [ebp - 4]
mov dword [ebp - 0xc], eax
xor eax, eax
mov al, byte [ebx + 0x14]
cmp eax, 7
ja case.default.0x4c5707
jmp dword [eax*4 + 0x4c570e]
mov eax, dword [ebp - 8]
cmp eax, dword [ebp - 0xc]
je 0x4c5758
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 8]
mov ecx, esi
call fcn.00402e24
jmp 0x4c5758
mov edx, dword [ebp - 0xc]
mov eax, ebx
mov ecx, dword [eax]
call dword [ecx + 0x30]
mov eax, dword [ebx + 0x24]
add dword [ebp - 0xc], eax
sub esi, dword [ebx + 0x24]
cmp esi, dword [ebx + 0x24]
jge 0x4c5745
test esi, esi
jle case.default.0x4c5707
mov edx, dword [ebx + 0x2c]
mov eax, dword [ebp - 0xc]
mov ecx, esi
call fcn.00402e24
mov edx, dword [ebx + 0x2c]
mov eax, ebx
mov ecx, dword [eax]
call dword [ecx + 0x2c]
mov edx, dword [ebp - 0xc]
mov eax, dword [ebx + 0x2c]
mov ecx, esi
call fcn.00402e24
jmp case.default.0x4c5707
mov eax, dword [ebp - 8]
cmp eax, dword [ebp - 0xc]
je 0x4c57a3
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 8]
mov ecx, esi
call fcn.00402e24
mov eax, dword [ebx + 0x34]
mov dword [ebp - 0x10], eax
mov eax, dword [ebx + 0x2c]
mov dword [ebp - 0x14], eax
jmp 0x4c57f9
mov eax, dword [ebp - 0x14]
push eax
mov ecx, edi
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 0xc]
call fcn.004b5070
mov edx, dword [ebp - 0xc]
mov eax, ebx
mov ecx, dword [eax]
call dword [ecx + 0x30]
mov eax, dword [ebp - 0xc]
push eax
mov ecx, dword [ebx + 0x24]
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 0xc]
call fcn.004b5070
mov eax, dword [ebp - 0x14]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 8]
mov dword [ebp - 0x10], eax
mov eax, dword [ebx + 0x24]
add dword [ebp - 0xc], eax
sub esi, dword [ebx + 0x24]
mov edi, dword [ebx + 0x24]
cmp esi, edi
jge 0x4c57b1
mov eax, dword [ebx + 0x34]
cmp eax, dword [ebp - 0x10]
je 0x4c5815
mov edx, eax
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebx + 0x24]
call fcn.00402e24
test esi, esi
jle case.default.0x4c5707
mov edx, dword [ebx + 0x2c]
mov eax, dword [ebx + 0x34]
mov ecx, dword [ebx + 0x24]
call fcn.00402e24
mov edx, dword [ebx + 0x2c]
mov eax, ebx
mov ecx, dword [eax]
call dword [ecx + 0x2c]
mov eax, dword [ebp - 0xc]
push eax
mov ecx, esi
mov edx, dword [ebp - 0xc]
mov eax, dword [ebx + 0x2c]
call fcn.004b5070
mov eax, dword [ebx + 0x34]
push eax
mov ecx, dword [ebx + 0x24]
mov edx, eax
mov eax, dword [ebx + 0x2c]
call fcn.004b5070
jmp case.default.0x4c5707
mov eax, dword [ebp - 8]
cmp eax, dword [ebp - 0xc]
je 0x4c5871
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 8]
mov ecx, esi
call fcn.00402e24
mov eax, dword [ebx + 0x34]
mov dword [ebp - 0x10], eax
mov eax, dword [ebx + 0x2c]
mov dword [ebp - 0x14], eax
jmp 0x4c58c3
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0xc]
mov ecx, edi
call fcn.00402e24
mov edx, dword [ebp - 0xc]
mov eax, ebx
mov ecx, dword [eax]
call dword [ecx + 0x30]
mov eax, dword [ebp - 0xc]
push eax
mov ecx, dword [ebx + 0x24]
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x10]
call fcn.004b5070
mov eax, dword [ebp - 0x14]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 8]
mov dword [ebp - 0x10], eax
mov eax, dword [ebx + 0x24]
add dword [ebp - 0xc], eax
sub esi, dword [ebx + 0x24]
mov edi, dword [ebx + 0x24]
cmp esi, edi
jge 0x4c587f
mov eax, dword [ebx + 0x34]
cmp eax, dword [ebp - 0x10]
je 0x4c58df
mov edx, eax
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebx + 0x24]
call fcn.00402e24
test esi, esi
jle case.default.0x4c5707
mov edx, dword [ebx + 0x2c]
mov eax, dword [ebx + 0x34]
mov ecx, dword [ebx + 0x24]
call fcn.00402e24
mov edx, dword [ebx + 0x2c]
mov eax, ebx
mov ecx, dword [eax]
call dword [ecx + 0x2c]
mov eax, dword [ebp - 0xc]
push eax
mov ecx, esi
mov edx, dword [ebx + 0x2c]
mov eax, dword [ebp - 0xc]
call fcn.004b5070
mov eax, dword [ebx + 0x34]
push eax
mov ecx, dword [ebx + 0x24]
mov edx, eax
mov eax, dword [ebx + 0x2c]
call fcn.004b5070
jmp case.default.0x4c5707
test esi, esi
jle case.default.0x4c5707
mov edx, dword [ebx + 0x2c]
mov eax, dword [ebx + 0x34]
mov ecx, dword [ebx + 0x24]
call fcn.00402e24
mov edx, dword [ebx + 0x2c]
mov eax, ebx
mov ecx, dword [eax]
call dword [ecx + 0x2c]
mov ecx, dword [ebx + 0x24]
dec ecx
mov edi, dword [ebx + 0x34]
mov edx, edi
lea eax, [edi + 1]
call fcn.00402e24
mov eax, dword [ebx + 0x34]
mov edx, dword [ebx + 0x24]
mov ecx, dword [ebp - 8]
mov cl, byte [ecx]
mov byte [eax + edx - 1], cl
mov eax, dword [ebp - 8]
mov al, byte [eax]
mov edx, dword [ebx + 0x2c]
xor al, byte [edx]
mov edx, dword [ebp - 0xc]
mov byte [edx], al
inc dword [ebp - 0xc]
inc dword [ebp - 8]
dec esi
test esi, esi
jg 0x4c592e
jmp case.default.0x4c5707
test esi, esi
jle case.default.0x4c5707
mov edx, dword [ebx + 0x2c]
mov eax, dword [ebx + 0x34]
mov ecx, dword [ebx + 0x24]
call fcn.00402e24
mov edx, dword [ebx + 0x2c]
mov eax, ebx
mov ecx, dword [eax]
call dword [ecx + 0x2c]
mov eax, dword [ebp - 8]
mov al, byte [eax]
mov edx, dword [ebx + 0x2c]
xor al, byte [edx]
mov edx, dword [ebp - 0xc]
mov byte [edx], al
mov ecx, dword [ebx + 0x24]
dec ecx
mov edi, dword [ebx + 0x34]
mov edx, edi
lea eax, [edi + 1]
call fcn.00402e24
mov eax, dword [ebx + 0x34]
mov edx, dword [ebx + 0x24]
mov ecx, dword [ebx + 0x2c]
mov cl, byte [ecx]
mov byte [eax + edx - 1], cl
inc dword [ebp - 0xc]
inc dword [ebp - 8]
dec esi
test esi, esi
jg 0x4c5986
jmp case.default.0x4c5707
push esi
mov ecx, dword [ebp - 4]
mov edx, edi
mov eax, ebx
call fcn.004c5208
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4c5a0f
lea eax, [ebp - 0x124]
call fcn.004047f0
lea eax, [ebp - 0x18]
call fcn.004047f0
ret