Function at 0x4edad631
Capabilities:
Encode data using xor

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x1024
call fcn.4ec71104
mov eax, dword [section..data]
or dword [ebp - 0x100c], 0xffffffff
push ebx
mov ebx, dword [ebp + 0x10]
push esi
push edi
mov edi, dword [ebp + 8]
xor esi, esi
test cl, 8
mov dword [ebp - 4], eax
mov byte [ebp - 0x1008], cl
mov dword [ebp - 0x1014], edx
mov dword [ebp - 0x1020], edi
mov dword [ebp - 0x101c], esi
je 0x4edad6a7
cmp dword [ebp + 0xc], esi
mov dword [ebp - 0x100c], esi
jbe 0x4edad6a0
movsx eax, byte [edi + esi]
cdq
xor eax, edx
sub eax, edx
add dword [ebp - 0x100c], eax
inc esi
cmp esi, dword [ebp + 0xc]
jb 0x4edad682
cmp dword [ebp - 0x100c], 0
jne 0x4edad6a7
xor al, al
jmp 0x4edada5b
cmp dword [ebp + 0xc], ebx
jbe 0x4edad71f
test cl, 0x10
jne 0x4edad6bf
test cl, cl
jns 0x4edad71f
xor ecx, ecx
cmp dword [ebp - 0x1014], ecx
jne 0x4edad72d
xor ecx, ecx
xor esi, esi
test ebx, ebx
jbe 0x4edad6fb
cmp esi, dword [ebp + 0xc]
jae 0x4edad700
movsx eax, byte [edi + esi]
cdq
xor eax, edx
sub eax, edx
add ecx, eax
inc esi
cmp esi, ebx
jae 0x4edad6fb
jmp 0x4edad6c7
cmp ecx, dword [ebp - 0x100c]
jae 0x4edad71f
mov dl, byte [edi + esi]
mov eax, edi
sub eax, ebx
sub dl, byte [eax + esi]
movsx eax, dl
cdq
xor eax, edx
sub eax, edx
add ecx, eax
inc esi
cmp esi, dword [ebp + 0xc]
jb 0x4edad6de
cmp ecx, dword [ebp - 0x100c]
jae 0x4edad71f
xor eax, eax
inc eax
test ecx, ecx
mov dword [ebp - 0x100c], ecx
mov dword [ebp - 0x101c], eax
je 0x4edada5b
xor ecx, ecx
cmp dword [ebp - 0x1014], ecx
je 0x4edad9f2
test byte [ebp - 0x1008], 0x20
jne 0x4edad744
cmp dword [ebp + 0xc], ebx
ja 0x4edad7b7
test byte [ebp - 0x1008], 0x80
je 0x4edad7b7
cmp dword [ebp + 0xc], ecx
mov dword [ebp - 0x1010], ecx
mov dword [ebp - 0x1018], ecx
jbe 0x4edad792
mov esi, dword [ebp - 0x1014]
mov ecx, edi
sub ecx, esi
mov eax, dword [ebp - 0x100c]
cmp dword [ebp - 0x1010], eax
jae 0x4edad7b7
mov al, byte [ecx + esi]
sub al, byte [esi]
movsx eax, al
cdq
xor eax, edx
sub eax, edx
add dword [ebp - 0x1010], eax
inc dword [ebp - 0x1018]
mov eax, dword [ebp - 0x1018]
inc esi
cmp eax, dword [ebp + 0xc]
jb 0x4edad75f
mov ecx, dword [ebp - 0x1010]
cmp ecx, dword [ebp - 0x100c]
jae 0x4edad7b7
test ecx, ecx
push 2
pop eax
mov dword [ebp - 0x100c], ecx
mov dword [ebp - 0x101c], eax
je 0x4edada5b
test byte [ebp - 0x1008], 0x40
je 0x4edad884
xor esi, esi
cmp ebx, esi
mov dword [ebp - 0x1010], esi
jbe 0x4edad808
mov eax, dword [ebp - 0x1014]
sub eax, edi
mov dword [ebp - 0x1018], eax
cmp esi, dword [ebp + 0xc]
jae 0x4edad85b
mov ecx, dword [ebp - 0x1018]
lea eax, [esi + edi]
mov cl, byte [ecx + eax]
mov al, byte [eax]
shr cl, 1
sub al, cl
movsx eax, al
cdq
xor eax, edx
sub eax, edx
add dword [ebp - 0x1010], eax
inc esi
cmp esi, ebx
jb 0x4edad7de
cmp esi, dword [ebp + 0xc]
jae 0x4edad85b
mov eax, dword [ebp - 0x1014]
sub eax, edi
lea ecx, [esi + edi]
mov dword [ebp - 0x1018], eax
mov eax, dword [ebp - 0x100c]
cmp dword [ebp - 0x1010], eax
jae 0x4edad884
mov edx, dword [ebp - 0x1018]
movzx edx, byte [edx + ecx]
mov eax, edi
sub eax, ebx
movzx eax, byte [eax + esi]
add eax, edx
mov dl, byte [ecx]
sar eax, 1
sub dl, al
movsx eax, dl
cdq
xor eax, edx
sub eax, edx
add dword [ebp - 0x1010], eax
inc esi
inc ecx
cmp esi, dword [ebp + 0xc]
jb 0x4edad81e
mov eax, dword [ebp - 0x1010]
cmp eax, dword [ebp - 0x100c]
jae 0x4edad884
test eax, eax
mov dword [ebp - 0x100c], eax
mov dword [ebp - 0x101c], 3
jne 0x4edad884
mov al, 3
jmp 0x4edada5b
cmp dword [ebp + 0xc], ebx
jbe 0x4edada55
test byte [ebp - 0x1008], 0x80
je 0x4edada55
mov eax, dword [ebp + 0xc]
shl eax, 4
cmp dword [ebp - 0x100c], eax
jbe 0x4edada55
mov edx, dword [ebp - 0x1014]
mov ecx, ebx
mov eax, ecx
shr ecx, 2
mov esi, edi
lea edi, [ebp - 0x1004]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push ebx
lea ecx, [ebp - 0x1004]
call fcn.4edad512
sub dword [ebp + 0xc], ebx
mov eax, dword [ebp + 0xc]
add dword [ebp - 0x1020], ebx
add dword [ebp - 0x1014], ebx
shl eax, 2
xor ecx, ecx
test ebx, ebx
mov dword [ebp - 0x1010], eax
jbe 0x4edad90f
movsx eax, byte [ebp + ecx - 0x1004]
cdq
xor eax, edx
sub eax, edx
add dword [ebp - 0x1010], eax
inc ecx
cmp ecx, ebx
jb 0x4edad8f7
cmp dword [ebp + 0xc], 0
jbe 0x4edad9d8
mov dword [ebp - 0x1018], 0x1000
sub dword [ebp - 0x1018], ebx
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x1018]
cmp eax, ecx
mov dword [ebp - 0x1024], eax
jbe 0x4edad942
mov dword [ebp - 0x1024], ecx
mov eax, dword [ebp - 0x1024]
mov esi, dword [ebp - 0x1020]
lea ecx, [ebx + eax]
mov edx, ecx
shr ecx, 2
sub esi, ebx
lea edi, [ebp - 0x1004]
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov edx, dword [ebp - 0x1014]
and ecx, 3
push ebx
rep movsb byte es:[edi], byte [esi]
push eax
lea ecx, [ebp + ebx - 0x1004]
call fcn.4edad59a
mov esi, dword [ebp - 0x1024]
xor ecx, ecx
test esi, esi
jbe 0x4edad9b0
mov eax, dword [ebp - 0x1010]
cmp eax, dword [ebp - 0x100c]
jae 0x4edad9b0
lea eax, [ebp + ebx - 0x1004]
movsx eax, byte [eax + ecx]
cdq
xor eax, edx
sub eax, edx
add dword [ebp - 0x1010], eax
inc ecx
cmp ecx, esi
jb 0x4edad987
sub dword [ebp + 0xc], esi
je 0x4edad9d8
mov eax, dword [ebp - 0x100c]
cmp dword [ebp - 0x1010], eax
jae 0x4edada55
add dword [ebp - 0x1020], esi
add dword [ebp - 0x1014], esi
jmp 0x4edad929
mov eax, dword [ebp - 0x100c]
cmp dword [ebp - 0x1010], eax
jae 0x4edada55
mov dword [ebp - 0x101c], 4
jmp 0x4edada55
cmp dword [ebp + 0xc], ebx
jbe 0x4edada55
test byte [ebp - 0x1008], 0x40
je 0x4edada55
xor esi, esi
test ebx, ebx
jbe 0x4edada3e
cmp esi, dword [ebp + 0xc]
jae 0x4edada43
movsx eax, byte [edi + esi]
cdq
xor eax, edx
sub eax, edx
add ecx, eax
inc esi
cmp esi, ebx
jae 0x4edada3e
jmp 0x4edada06
cmp ecx, dword [ebp - 0x100c]
jae 0x4edada55
mov dl, byte [edi + esi]
mov eax, edi
sub eax, ebx
mov al, byte [eax + esi]
shr al, 1
sub dl, al
movsx eax, dl
cdq
xor eax, edx
sub eax, edx
add ecx, eax
inc esi
cmp esi, dword [ebp + 0xc]
jb 0x4edada1d
cmp ecx, dword [ebp - 0x100c]
jae 0x4edada55
mov dword [ebp - 0x101c], 3
mov al, byte [ebp - 0x101c]
mov ecx, dword [ebp - 4]
pop edi
pop esi
pop ebx
call fcn.4ecfd994
leave
ret 0xc