Function at 0x100049b0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
push edi
mov edi, eax
test dl, 0xf
je 0x100049c8
mov eax, 0xffffffda
pop edi
mov esp, ebp
pop ebp
ret
cmp dword [ebp + 0xc], 0
push ebx
push esi
jne 0x10004c6f
test edx, edx
je 0x10004d25
mov eax, dword [ebp + 0x10]
sub eax, edi
mov dword [ebp - 8], eax
mov eax, dword [ebp + 0x14]
lea esi, [edi + 2]
sub edi, eax
lea ebx, [eax + 2]
lea eax, [edx - 1]
add edi, 0xfffffffe
shr eax, 4
inc eax
mov dword [ebp - 0xc], esi
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x10], eax
mov eax, dword [ebx - 2]
mov edx, dword [ebx + 6]
mov ecx, dword [ebx + 2]
mov dword [ebp - 0x34], eax
mov eax, dword [ebx + 0xa]
mov dword [ebp - 0x28], eax
mov eax, dword [ebp + 8]
lea edi, [eax + 4]
mov dword [ebp - 0x30], ecx
mov ecx, dword [eax]
movzx eax, byte [ebx - 1]
mov dword [ebp - 0x2c], edx
movzx edx, byte [ebx - 2]
mov dword [ebp - 4], ecx
movzx ecx, byte [ebx]
shl edx, 8
or eax, edx
movzx edx, byte [ebx + 1]
shl eax, 8
or eax, ecx
movzx ecx, byte [ebx + 3]
shl eax, 8
or eax, edx
movzx edx, byte [ebx + 4]
mov dword [ebp - 0x24], eax
movzx eax, byte [ebx + 2]
shl eax, 8
or eax, ecx
movzx ecx, byte [ebx + 5]
shl eax, 8
or eax, edx
movzx edx, byte [ebx + 7]
shl eax, 8
or eax, ecx
movzx ecx, byte [ebx + 8]
mov dword [ebp - 0x20], eax
movzx eax, byte [ebx + 6]
shl eax, 8
or eax, edx
movzx edx, byte [ebx + 9]
shl eax, 8
or eax, ecx
movzx ecx, byte [ebx + 0xa]
shl eax, 8
or eax, edx
movzx edx, byte [ebx + 0xb]
xor eax, dword [edi + 8]
shl ecx, 8
or ecx, edx
movzx edx, byte [ebx + 0xc]
shl ecx, 8
or ecx, edx
movzx edx, byte [ebx + 0xd]
shl ecx, 8
or ecx, edx
mov edx, dword [edi]
xor dword [ebp - 0x24], edx
mov edx, dword [edi + 4]
xor ecx, dword [edi + 0xc]
xor dword [ebp - 0x20], edx
add edi, 0x10
cmp dword [ebp - 4], 0
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], ecx
je 0x10004b77
lea ebx, [ebx]
dec dword [ebp - 4]
lea esi, [ebp - 0x1c]
mov eax, edi
lea edx, [ebp - 0x24]
call fcn.10003990
lea esi, [ebp - 0x24]
lea eax, [edi + 8]
lea edx, [ebp - 0x1c]
call fcn.10003990
lea esi, [ebp - 0x1c]
lea eax, [edi + 0x10]
lea edx, [ebp - 0x24]
call fcn.10003990
lea esi, [ebp - 0x24]
lea eax, [edi + 0x18]
lea edx, [ebp - 0x1c]
call fcn.10003990
lea esi, [ebp - 0x1c]
lea eax, [edi + 0x20]
lea edx, [ebp - 0x24]
call fcn.10003990
lea esi, [ebp - 0x24]
lea eax, [edi + 0x28]
lea edx, [ebp - 0x1c]
call fcn.10003990
add edi, 0x30
cmp dword [ebp - 4], 0
je 0x10004b6e
mov eax, dword [ebp - 0x24]
mov edx, dword [edi]
mov ecx, dword [ebp - 0x20]
and edx, eax
rol edx, 1
xor ecx, edx
mov edx, dword [edi + 4]
or edx, ecx
xor eax, edx
mov edx, dword [edi + 0xc]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x18]
or edx, eax
mov dword [ebp - 0x20], ecx
mov ecx, dword [ebp - 0x1c]
xor ecx, edx
mov edx, dword [edi + 8]
and edx, ecx
rol edx, 1
xor eax, edx
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x18], eax
add edi, 0x10
jmp 0x10004ad0
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
mov esi, dword [ebp - 0xc]
xor eax, dword [edi]
xor ecx, dword [edi + 4]
mov edx, dword [edi + 8]
xor dword [ebp - 0x24], edx
mov edx, dword [edi + 0xc]
xor dword [ebp - 0x20], edx
mov edi, dword [ebp - 0x14]
mov edx, eax
shr edx, 0x18
mov byte [edi + ebx], dl
mov edx, eax
shr edx, 0x10
add edi, ebx
mov byte [esi - 1], dl
mov edx, eax
mov byte [esi + 1], al
mov eax, ecx
shr eax, 0x18
shr edx, 8
mov byte [esi + 2], al
mov eax, ecx
mov byte [esi], dl
mov edx, ecx
shr eax, 8
mov byte [esi + 5], cl
shr edx, 0x10
mov byte [esi + 4], al
mov eax, dword [ebp - 0x24]
mov byte [esi + 3], dl
mov ecx, eax
shr ecx, 0x18
mov byte [esi + 6], cl
mov edx, eax
shr edx, 0x10
mov ecx, eax
shr ecx, 8
mov byte [esi + 7], dl
mov byte [esi + 9], al
mov eax, dword [ebp - 0x20]
mov byte [esi + 8], cl
mov edx, eax
shr edx, 0x18
mov ecx, eax
shr ecx, 0x10
mov byte [esi + 0xa], dl
mov edx, eax
mov dword [ebp - 0xc], edi
mov byte [esi + 0xb], cl
mov ecx, dword [ebp + 0x10]
shr edx, 8
mov byte [esi + 0xd], al
mov eax, dword [ebp - 0xc]
mov byte [esi + 0xc], dl
lea edi, [ecx + 2]
mov dword [ebp - 4], 4
mov edx, dword [ebp - 8]
movzx edx, byte [eax + edx]
xor byte [eax], dl
movzx edx, byte [edi - 1]
xor byte [eax + 1], dl
movzx edx, byte [edi]
xor byte [eax + 2], dl
movzx edx, byte [edi + 1]
xor byte [eax + 3], dl
add eax, 4
add edi, 4
dec dword [ebp - 4]
jne 0x10004c11
mov eax, dword [ebp - 0x34]
mov edx, dword [ebp - 0x30]
sub dword [ebp - 8], 0x10
mov dword [ecx], eax
mov eax, dword [ebp - 0x2c]
mov dword [ecx + 4], edx
mov edx, dword [ebp - 0x28]
add esi, 0x10
add ebx, 0x10
dec dword [ebp - 0x10]
mov dword [ecx + 8], eax
mov dword [ecx + 0xc], edx
mov dword [ebp - 0xc], esi
jne 0x10004a02
pop esi
pop ebx
xor eax, eax
pop edi
mov esp, ebp
pop ebp
ret
test edx, edx
je 0x10004d25
mov ecx, dword [ebp + 0x10]
mov eax, ecx
sub eax, edi
dec edx
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x14]
mov esi, ecx
sub esi, eax
shr edx, 4
inc edx
mov dword [ebp - 8], esi
mov dword [ebp - 0xc], edx
mov edx, edi
lea esi, [ecx + 3]
lea ecx, [edi + 1]
sub edx, eax
mov dword [ebp - 0x10], 4
mov ebx, dword [ebp - 8]
movzx ebx, byte [ebx + eax]
xor bl, byte [eax]
add eax, 4
mov byte [eax + edx - 4], bl
mov ebx, dword [ebp - 4]
movzx ebx, byte [ebx + ecx]
xor bl, byte [eax - 3]
add ecx, 4
mov byte [ecx - 4], bl
movzx ebx, byte [eax - 2]
xor bl, byte [esi - 1]
add esi, 4
mov byte [ecx - 3], bl
movzx ebx, byte [eax - 1]
xor bl, byte [esi - 4]
dec dword [ebp - 0x10]
mov byte [ecx - 2], bl
jne 0x10004ca4
mov ecx, dword [ebp + 8]
push edi
mov eax, edi
call fcn.100047c0
mov eax, dword [edi]
mov ecx, dword [ebp + 0x10]
mov dword [ecx], eax
mov edx, dword [edi + 4]
mov dword [ecx + 4], edx
mov eax, dword [edi + 8]
mov dword [ecx + 8], eax
mov edx, dword [edi + 0xc]
mov eax, dword [ebp + 0x14]
mov dword [ecx + 0xc], edx
mov edx, 0x10
sub dword [ebp - 8], edx
sub dword [ebp - 4], edx
add eax, edx
add esp, 4
add edi, edx
dec dword [ebp - 0xc]
mov dword [ebp + 0x14], eax
jne 0x10004c93
pop esi
pop ebx
xor eax, eax
pop edi
mov esp, ebp
pop ebp
ret