Function at 0x4ed090
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0x10]
sub esp, 0x18
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov edi, dword [ebp + 0x14]
test eax, eax
jne 0x4ed0bc
push 0
push edi
push dword [ebp + 0xc]
push ebx
call fcn.004e9a90
add esp, 0x10
mov dword [ebp + 0x10], eax
test eax, eax
je 0x4ed0c6
cmp dword [eax + 0xc], 0
jne 0x4ed1c2
cmp dword [ebx + 0xc8], 0
je 0x4ed104
push edi
push ebx
call fcn.004e5610
mov esi, eax
add esp, 8
test esi, esi
je 0x4ed1b0
mov eax, dword [ebp + 0xc]
push esi
movzx ecx, al
mov eax, dword [ebx + 0xc8]
push ecx
push ebx
push dword [ebx + 0xd0]
call eax
push esi
push ebx
call fcn.004e5400
add esp, 0x18
cmp dword [ebx + 0xcc], 0
je 0x4ed1b0
push 0x28
push ebx
call fcn.004e5490
mov esi, eax
add esp, 8
test esi, esi
je 0x4ed14f
push 0
mov eax, 1
xorps xmm0, xmm0
push eax
movups xmmword [esi], xmm0
push 0xffffffffffffffff
movups xmmword [esi + 0x10], xmm0
push edi
movq qword [esi + 0x20], xmm0
push esi
mov word [esi + 0x1c], ax
mov byte [esi + 0x1e], 5
mov dword [esi], ebx
call fcn.00507990
add esp, 0x14
push 2
push esi
call fcn.004fe150
add esp, 8
test eax, eax
je 0x4ed17c
push eax
mov eax, dword [ebx + 8]
mov eax, dword [eax + 0xc]
movzx eax, byte [eax + 0x4d]
push eax
mov eax, dword [ebx + 0xcc]
push ebx
push dword [ebx + 0xd0]
call eax
add esp, 0x10
test esi, esi
je 0x4ed1b0
push esi
call fcn.00507720
push dword [esi + 0x24]
push dword [esi]
call fcn.004e5400
push esi
push dword [esi]
mov dword [esi + 4], 0
mov dword [esi + 0x24], 0
mov dword [esi + 0x20], 0
call fcn.004e5400
add esp, 0x14
push 0
push edi
push dword [ebp + 0xc]
push ebx
call fcn.004e9a90
add esp, 0x10
mov dword [ebp + 0x10], eax
test eax, eax
je 0x4ed2c0
cmp dword [eax + 0xc], 0
jne 0x4ed2c0
mov esi, dword [eax]
xor edx, edx
mov dword [ebp - 0x18], esi
mov dword [ebp - 0xc], edx
nop
mov al, byte [edx + 0x5d003c]
mov byte [ebp - 1], al
test esi, esi
je 0x4ed27f
cmp byte [esi], 0
mov ecx, esi
je 0x4ed1fe
inc ecx
cmp byte [ecx], 0
jne 0x4ed1f8
sub ecx, esi
lea eax, [ebx + 0x19c]
and ecx, 0x3fffffff
mov dword [ebp - 8], eax
cmp dword [eax + 0xc], 0
mov dword [ebp - 0x14], ecx
je 0x4ed258
xor edi, edi
mov dword [ebp - 0x10], esi
mov ebx, ecx
test ecx, ecx
je 0x4ed248
mov ecx, esi
movzx eax, byte [ecx]
lea edx, [edi*8]
dec ebx
lea ecx, [ecx + 1]
movzx esi, byte [eax + 0x5cfac8]
xor esi, edx
xor edi, esi
test ebx, ebx
jg 0x4ed225
mov ecx, dword [ebp - 0x14]
mov esi, dword [ebp - 0x18]
mov ebx, dword [ebp + 8]
mov eax, edi
mov edi, dword [ebp - 8]
xor edx, edx
div dword [edi]
mov eax, edi
jmp 0x4ed25a
xor edx, edx
push edx
push ecx
push esi
push eax
call fcn.004ce000
add esp, 0x10
test eax, eax
je 0x4ed275
mov ecx, dword [eax + 8]
mov edx, dword [ebp - 0xc]
mov al, byte [ebp - 1]
jmp 0x4ed282
mov edx, dword [ebp - 0xc]
xor ecx, ecx
mov al, byte [ebp - 1]
jmp 0x4ed282
mov ecx, dword [ebx + 0x2c]
test ecx, ecx
je 0x4ed292
movzx eax, al
lea eax, [eax + eax*4]
lea ecx, [ecx + eax*4]
add ecx, 0xffffffec
cmp dword [ecx + 0xc], 0
jne 0x4ed2ae
inc edx
mov dword [ebp - 0xc], edx
cmp edx, 3
jl 0x4ed1e0
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp + 0x10]
mov eax, edx
movups xmm0, xmmword [ecx]
movups xmmword [edx], xmm0
mov dword [edx + 0x10], 0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret