Function at 0x4df360
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
push ebx
push esi
mov esi, dword [ebp + 8]
mov bl, byte [esi]
mov ecx, dword [esi + 0x28]
mov eax, dword [esi + 0x2c]
mov byte [ebp - 1], bl
mov dword [ebp - 8], ecx
mov dword [ebp - 0xc], eax
test bl, 0x40
jne 0x4df38c
push eax
lea eax, [esi + 0x10]
push eax
push esi
call ecx
add esp, 0xc
movzx eax, bl
mov edx, 0xf
and eax, 7
xor ecx, ecx
sub edx, eax
mov byte [esi], al
mov dword [ebp - 0x18], edx
cmp edx, 0xf
jae 0x4df3b8
movzx eax, byte [edx + esi]
or ecx, eax
mov byte [edx + esi], 0
inc edx
shl ecx, 8
cmp edx, 0xf
jb 0x4df3a5
movzx eax, byte [esi + 0xf]
or ecx, eax
mov byte [esi + 0xf], 1
mov eax, dword [ebp + 0x14]
cmp ecx, eax
je 0x4df3d2
pop esi
or eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret
mov ebx, dword [ebp + 0x10]
push edi
cmp eax, 0x10
jb 0x4df46d
mov edi, 0xfffffff8
sub edi, esi
shr eax, 4
mov dword [ebp - 0x14], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x10], eax
push dword [ebp - 0xc]
lea eax, [ebp - 0x28]
push eax
push esi
call dword [ebp - 8]
add esp, 0xc
lea eax, [esi + 0x10]
add byte [eax - 1], 1
lea eax, [eax - 1]
jne 0x4df413
lea ecx, [edi + eax]
test ecx, ecx
jne 0x4df403
mov edx, dword [ebp - 0x10]
push dword [ebp - 0xc]
mov ecx, dword [edx]
mov eax, dword [edx + 4]
xor eax, dword [ebp - 0x24]
xor ecx, dword [ebp - 0x28]
mov dword [ebx + 4], eax
mov dword [ebx], ecx
xor dword [esi + 0x14], eax
xor dword [esi + 0x10], ecx
mov ecx, dword [edx + 8]
mov eax, dword [edx + 0xc]
xor eax, dword [ebp - 0x1c]
xor ecx, dword [ebp - 0x20]
mov dword [ebx + 0xc], eax
mov dword [ebx + 8], ecx
xor dword [esi + 0x1c], eax
lea eax, [esi + 0x10]
xor dword [esi + 0x18], ecx
push eax
push eax
call dword [ebp - 8]
mov eax, dword [ebp + 0x14]
add esp, 0xc
add dword [ebp - 0x10], 0x10
sub eax, 0x10
add ebx, 0x10
mov dword [ebp + 0x14], eax
sub dword [ebp - 0x14], 1
jne 0x4df3f2
mov edi, dword [ebp - 0x10]
jmp 0x4df470
mov edi, dword [ebp + 0xc]
test eax, eax
je 0x4df4cd
push dword [ebp - 0xc]
lea eax, [ebp - 0x28]
push eax
push esi
call dword [ebp - 8]
xor edx, edx
add esp, 0xc
cmp dword [ebp + 0x14], edx
jbe 0x4df4bb
lea eax, [ebp - 0x28]
sub edi, eax
sub ebx, eax
lea eax, [esi + 0x10]
mov esi, dword [ebp + 0x14]
mov dword [ebp - 0x14], eax
nop dword [eax]
lea eax, [ebp - 0x28]
add eax, edx
mov cl, byte [edi + eax]
xor cl, byte [eax]
mov byte [ebx + eax], cl
mov eax, dword [ebp - 0x14]
xor byte [eax + edx], cl
inc edx
cmp edx, esi
jb 0x4df4a0
mov esi, dword [ebp + 8]
push dword [ebp - 0xc]
mov ebx, dword [ebp - 8]
lea eax, [esi + 0x10]
push eax
push eax
call ebx
add esp, 0xc
jmp 0x4df4d0
mov ebx, dword [ebp - 8]
mov edx, dword [ebp - 0x18]
cmp edx, 0x10
jae 0x4df4f2
mov ecx, 0x10
lea edi, [edx + esi]
sub ecx, edx
xor eax, eax
mov edx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
push dword [ebp - 0xc]
lea eax, [ebp - 0x28]
push eax
push esi
call ebx
mov eax, dword [ebp - 0x28]
add esp, 0xc
xor dword [esi + 0x10], eax
mov eax, dword [ebp - 0x24]
xor dword [esi + 0x14], eax
mov eax, dword [ebp - 0x20]
xor dword [esi + 0x18], eax
mov eax, dword [ebp - 0x1c]
xor dword [esi + 0x1c], eax
mov al, byte [ebp - 1]
pop edi
mov byte [esi], al
xor eax, eax
pop esi
pop ebx
mov esp, ebp
pop ebp
ret