Function at 0x4d6478
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffb0
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x50], ebx
mov dword [ebp - 0x40], ebx
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x18]
call fcn.00404f04
mov eax, dword [ebp + 0x14]
call fcn.00404f04
mov eax, dword [ebp + 0x10]
call fcn.00404f04
xor eax, eax
push ebp
push 0x4d66ea
push dword fs:[eax]
mov dword fs:[eax], esp
sub dword [ebp - 8], 3
lea edx, [ebp - 0x31]
mov eax, dword [ebp - 4]
call fcn.004d6178
cmp byte [ebp + 0x1c], 0
jne 0x4d6502
lea edx, [ebp - 0x38]
mov eax, dword [ebp + 0x14]
call fcn.004092b0
mov edx, dword [ebp - 0x38]
lea eax, [ebp + 0x14]
call fcn.00404aec
lea edx, [ebp - 0x3c]
mov eax, dword [ebp + 0x10]
call fcn.004092b0
mov edx, dword [ebp - 0x3c]
lea eax, [ebp + 0x10]
call fcn.00404aec
mov bl, byte [ebp - 4]
cmp byte [ebp + 0x1c], 0
je 0x4d650e
or bl, 4
mov byte [ebp - 0x11], bl
jmp 0x4d6517
sub byte [ebp - 0x11], 8
mov al, byte [ebp - 0x11]
and eax, 0xff
bt dword [ebp - 0x31], eax
jae 0x4d6513
lea ecx, [ebp - 0x10]
mov edx, dword [ebp - 8]
mov al, 0x58
call fcn.00405104
xor eax, eax
xor ebx, ebx
xor esi, esi
cmp dword [ebp + 0xc], 1
jle 0x4d654d
mov eax, 0xa
mov ebx, 0x14
mov esi, 0x1e
lea edx, [ebp + 0x18]
mov ecx, eax
mov eax, dword [ebp - 8]
xchg edx, eax
call fcn.004d6364
lea eax, [ebp + 0x14]
mov ecx, ebx
mov edx, dword [ebp - 8]
call fcn.004d6364
lea eax, [ebp + 0x10]
mov ecx, esi
mov edx, dword [ebp - 8]
call fcn.004d6364
xor ebx, ebx
mov edi, dword [ebp - 8]
test edi, edi
jle 0x4d65ab
mov esi, 1
mov eax, dword [ebp + 0x18]
xor bl, byte [eax + esi - 1]
mov eax, dword [ebp + 0x14]
xor bl, byte [eax + esi - 1]
mov eax, dword [ebp + 0x10]
xor bl, byte [eax + esi - 1]
add bl, 0x13
lea eax, [ebp - 0x10]
call fcn.00404f6c
mov byte [eax + esi - 1], bl
inc esi
dec edi
jne 0x4d6583
mov edi, dword [ebp - 8]
test edi, edi
jle 0x4d65e0
mov esi, 1
mov eax, dword [ebp - 0x10]
mov bl, byte [eax + esi - 1]
jmp 0x4d65c3
add bl, 0x59
mov eax, ebx
and eax, 0xff
bt dword [ebp - 0x31], eax
jae 0x4d65c0
lea eax, [ebp - 0x10]
call fcn.00404f6c
mov byte [eax + esi - 1], bl
inc esi
dec edi
jne 0x4d65b7
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 4]
call fcn.004d61dc
mov edx, eax
lea eax, [ebp - 0x44]
mov byte [eax + 1], dl
mov byte [eax], 1
lea edx, [ebp - 0x44]
lea eax, [ebp - 0x48]
call fcn.00402fb0
lea eax, [ebp - 0x4c]
mov dl, byte [ebp - 0x11]
mov byte [eax + 1], dl
mov byte [eax], 1
lea edx, [ebp - 0x4c]
lea eax, [ebp - 0x48]
mov cl, 2
call fcn.00402f80
lea edx, [ebp - 0x48]
lea eax, [ebp - 0x40]
call fcn.00404cb8
mov edx, dword [ebp - 0x40]
lea eax, [ebp - 0x10]
mov ecx, dword [ebp - 0x10]
call fcn.00404d60
mov eax, dword [ebp - 0x10]
call fcn.004d62a0
mov edx, eax
lea eax, [ebp - 0x50]
call fcn.00404c3c
mov edx, dword [ebp - 0x50]
lea eax, [ebp - 0x10]
call fcn.00404d1c
cmp byte [ebp + 0x20], 0
je 0x4d66a7
mov eax, dword [ebp - 0x10]
call fcn.00404d14
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
mov ecx, 3
cdq
idiv ecx
test edx, edx
jne 0x4d6677
mov ebx, 4
jmp 0x4d667c
mov ebx, 5
mov esi, ebx
mov eax, dword [ebp - 0x10]
call fcn.00404d14
cmp esi, eax
jge 0x4d6699
lea edx, [ebp - 0x10]
mov ecx, esi
mov eax, 0x4d6704
call fcn.00404ffc
add esi, ebx
mov eax, dword [ebp - 0x10]
call fcn.00404d14
cmp esi, eax
jl 0x4d667e
mov eax, dword [ebp + 8]
mov edx, dword [ebp - 0x10]
call fcn.00404aa8
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4d66f1
lea eax, [ebp - 0x50]
call fcn.00404a54
lea eax, [ebp - 0x40]
mov edx, 3
call fcn.00404a78
lea eax, [ebp - 0x10]
call fcn.00404a54
lea eax, [ebp + 0x10]
mov edx, 3
call fcn.00404a78
ret