Function at 0x499850
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push esi
push edi
mov edi, dword [ebp + 8]
mov esi, edx
mov eax, dword [edi]
mov edx, dword [edi + 0xf64]
mov dword [ebp - 8], edx
cmp eax, 7
ja case.default.0x499871
push ebx
jmp dword [eax*4 + 0x499b2c]
imul eax, esi, 3
push eax
push ecx
push dword [ebp + 0xc]
call fcn.006f6760
add esp, 0xc
jmp 0x499b24
sub esi, 1
js 0x499b24
mov edi, dword [ebp + 0xc]
lea edx, [ecx + 1]
lea ebx, [edi + 2]
sub edi, ecx
sub esi, 1
mov al, byte [edx + 1]
mov byte [edi + edx - 1], al
mov al, byte [edx]
lea edx, [edx + 3]
mov byte [ebx - 1], al
mov al, byte [edx - 4]
mov byte [ebx], al
lea ebx, [ebx + 3]
jns 0x4998a1
jmp 0x499b24
sub esi, 1
mov eax, dword [ebp + 0xc]
mov dword [ebp + 8], eax
js 0x499b24
movzx eax, dx
lea ebx, [ecx + 2]
mov dword [ebp - 8], eax
movzx eax, byte [ebx - 2]
movzx ecx, byte [ebx - 1]
mov dx, word [edi + eax*4 + 0x804]
movzx eax, byte [ebx]
lea ebx, [ebx + 3]
or dx, word [edi + ecx*4 + 0x404]
or dx, word [edi + eax*4 + 4]
mov eax, dword [ebp + 8]
xor dx, word [ebp - 8]
mov word [eax], dx
add eax, 2
sub esi, 1
mov dword [ebp + 8], eax
jns 0x4998da
jmp 0x499b24
sub esi, 1
mov eax, dword [ebp + 0xc]
mov dword [ebp + 8], eax
js 0x499b24
lea ebx, [ecx + 2]
movzx eax, byte [ebx - 2]
movzx ecx, byte [ebx - 1]
mov edx, dword [edi + eax*4 + 0x804]
movzx eax, byte [ebx]
lea ebx, [ebx + 3]
or edx, dword [edi + ecx*4 + 0x404]
or edx, dword [edi + eax*4 + 4]
mov eax, dword [ebp + 8]
xor edx, dword [ebp - 8]
mov dword [eax], edx
add eax, 4
sub esi, 1
mov dword [ebp + 8], eax
jns 0x499929
jmp 0x499b24
sub esi, 1
js 0x499b24
mov edi, dword [ebp + 0xc]
lea edx, [ecx + 2]
movzx eax, byte [edx - 1]
imul ecx, eax, 9
movzx eax, byte [edx - 2]
lea ecx, [ecx + eax*2]
movzx eax, byte [edx]
imul eax, eax, 5
lea edx, [edx + 3]
add ecx, eax
shr ecx, 4
mov byte [edi], cl
inc edi
sub esi, 1
jns 0x499970
jmp 0x499b24
sub esi, 1
js 0x499b24
mov eax, dword [ebp + 0xc]
lea ebx, [ecx + 2]
mov dword [ebp + 8], eax
movzx eax, byte [ebx - 2]
movzx ecx, byte [ebx - 1]
mov edx, dword [edi + eax*4 + 0x804]
movzx eax, byte [ebx]
lea ebx, [ebx + 3]
add edx, dword [edi + ecx*4 + 0x404]
mov ecx, dword [ebp + 8]
add edx, dword [edi + eax*4 + 4]
mov al, byte [edi + edx*4 + 0xc04]
mov byte [ecx], al
inc ecx
sub esi, 1
mov dword [ebp + 8], ecx
jns 0x4999ab
jmp 0x499b24
movzx eax, byte [edi + 0xf70]
add eax, 8
mov byte [ebp - 1], 0
imul ebx, eax, 0x18
movzx eax, byte [edi + 0xf71]
imul eax, eax, 0x6c
mov byte [ebp + 0xb], 0x80
add ebx, eax
movzx eax, byte [edi + 0xf72]
imul eax, eax, 0x3c
add ebx, eax
shr ebx, 4
sub esi, 1
js 0x499b24
mov edi, dword [ebp + 0xc]
lea edx, [ecx + 2]
mov dword [ebp - 8], edx
movzx eax, byte [edx - 1]
imul ecx, eax, 9
movzx eax, byte [edx - 2]
lea edx, [ecx + eax*2]
mov eax, dword [ebp - 8]
movzx eax, byte [eax]
imul eax, eax, 5
add edx, eax
mov al, byte [ebp + 0xb]
or al, byte [ebp - 1]
cmp edx, ebx
movzx ecx, al
movzx eax, byte [ebp - 1]
cmovae ecx, eax
mov al, cl
mov byte [ebp - 1], cl
mov cl, byte [ebp + 0xb]
shr cl, 1
mov byte [ebp + 0xb], cl
jne 0x499a6e
mov byte [edi], al
mov cl, 0x80
inc edi
mov byte [ebp + 0xb], cl
xor al, al
mov byte [ebp - 1], al
mov edx, dword [ebp - 8]
add edx, 3
sub esi, 1
mov dword [ebp - 8], edx
jns 0x499a27
cmp cl, 0x80
jae 0x499b24
jmp 0x499b22
movzx eax, byte [edi + 0xf70]
add eax, 8
mov byte [ebp - 1], 0
imul ebx, eax, 0x18
movzx eax, byte [edi + 0xf71]
imul eax, eax, 0x6c
mov byte [ebp + 0xb], 1
add ebx, eax
movzx eax, byte [edi + 0xf72]
imul eax, eax, 0x3c
add ebx, eax
shr ebx, 4
sub esi, 1
js 0x499b24
mov edi, dword [ebp + 0xc]
lea edx, [ecx + 2]
mov dword [ebp - 8], edx
movzx eax, byte [edx - 1]
imul ecx, eax, 9
movzx eax, byte [edx - 2]
lea edx, [ecx + eax*2]
mov eax, dword [ebp - 8]
movzx eax, byte [eax]
imul eax, eax, 5
add edx, eax
mov al, byte [ebp + 0xb]
or al, byte [ebp - 1]
cmp edx, ebx
movzx ecx, al
movzx eax, byte [ebp - 1]
cmovae ecx, eax
mov al, cl
mov byte [ebp - 1], cl
mov cl, byte [ebp + 0xb]
add cl, cl
mov byte [ebp + 0xb], cl
jne 0x499b0f
mov byte [edi], al
mov cl, 1
inc edi
mov byte [ebp + 0xb], cl
xor al, al
mov byte [ebp - 1], al
mov edx, dword [ebp - 8]
add edx, 3
sub esi, 1
mov dword [ebp - 8], edx
jns 0x499ac8
cmp cl, 1
jbe 0x499b24
mov byte [edi], al
pop ebx
pop edi
pop esi
leave
ret