Function at 0x499530
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
push ebx
mov ebx, ecx
push edi
mov dword [ebp - 0x24], ebx
mov eax, dword [ebx]
mov edx, dword [ebx + 4]
cmp eax, edx
jne 0x49954d
mov eax, 0x10
jmp 0x499561
sub edx, eax
mov eax, 0x2aaaaaab
imul edx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add eax, edx
add eax, eax
push esi
lea ecx, [ebx + 0x10]
push eax
mov dword [ebp - 0x18], ecx
push ecx
lea ecx, [ebp - 0x48]
call fcn.00492400
mov esi, dword [ebx]
xor ecx, ecx
mov edi, dword [ebp - 0x48]
mov eax, 0x2aaaaaab
mov dword [ebp - 8], ecx
mov ecx, dword [ebx + 4]
sub ecx, esi
imul ecx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add eax, edx
je 0x4996cc
xor ecx, ecx
mov dword [ebp - 0xc], ecx
nop dword [eax]
mov edx, dword [ebp - 0x18]
lea eax, [ecx + esi]
mov ebx, dword [eax]
mov dword [ebp - 0x14], eax
mov eax, dword [eax + 4]
mov ecx, dword [edx + 4]
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x1c], 0
cmp eax, ecx
jne 0x4995d3
push ecx
push dword [edx]
push ebx
call fcn.004959f0
add esp, 0xc
test eax, eax
je 0x49969f
mov ecx, dword [ebp - 0x44]
mov eax, 0x2aaaaaab
sub ecx, edi
xor esi, esi
imul ecx
sar edx, 1
mov ecx, edx
dec edx
shr ecx, 0x1f
add ecx, edx
mov edx, dword [ebp - 0x28]
mov dword [ebp - 4], ecx
lea edi, [ebx + edx]
cmp ebx, edi
je 0x499623
mov edx, ebx
nop word [eax + eax]
mov ecx, esi
mov eax, esi
shr eax, 2
shl ecx, 6
add ecx, eax
movsx eax, byte [edx]
add eax, 0x9e3779b9
inc edx
add eax, ecx
xor esi, eax
cmp edx, edi
jne 0x499600
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 0x28]
and esi, ecx
xor ebx, ebx
mov edi, dword [ebp - 0x48]
lea eax, [esi + esi*2]
lea eax, [edi + eax*4]
mov edi, dword [eax]
mov dword [ebp - 0x10], eax
mov eax, dword [eax + 4]
mov dword [ebp - 0x1c], eax
cmp eax, dword [ebp - 0x34]
jne 0x499660
push dword [ebp - 0x34]
push dword [ebp - 0x38]
push edi
call fcn.004959f0
add esp, 0xc
test eax, eax
je 0x4996ef
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 0x28]
cmp eax, edx
jne 0x49967d
mov eax, dword [ebp - 0x14]
push edx
push dword [eax]
push edi
call fcn.004959f0
add esp, 0xc
test eax, eax
je 0x4996ef
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 0x28]
inc esi
add esi, ebx
inc ebx
and esi, ecx
cmp ebx, ecx
jbe 0x499627
xor edx, edx
mov ebx, dword [ebp - 0x14]
mov edi, dword [ebp - 0x48]
mov eax, dword [ebx]
mov ecx, dword [ebx + 4]
mov dword [edx], eax
mov dword [edx + 4], ecx
mov eax, dword [ebx + 8]
mov dword [edx + 8], eax
mov ebx, dword [ebp - 0x24]
mov eax, 0x2aaaaaab
inc dword [ebp - 8]
add dword [ebp - 0xc], 0xc
mov ecx, dword [ebx + 4]
mov esi, dword [ebx]
sub ecx, esi
imul ecx
mov ecx, dword [ebp - 0xc]
sar edx, 1
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp dword [ebp - 8], eax
jb 0x4995a0
lea eax, [ebp - 0x48]
pop esi
cmp ebx, eax
je 0x4996f4
mov ecx, ebx
call fcn.00495490
mov eax, dword [ebp - 0x44]
mov dword [ebx], edi
mov dword [ebx + 4], eax
mov eax, dword [ebp - 0x40]
pop edi
mov dword [ebx + 8], eax
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp - 0x10]
jmp 0x499689
test edi, edi
je 0x499737
mov ecx, dword [ebp - 0x40]
mov eax, 0x2aaaaaab
sub ecx, edi
imul ecx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add eax, edx
lea ecx, [eax + eax*2]
mov eax, edi
shl ecx, 2
cmp ecx, 0x1000
jb 0x49972d
mov edi, dword [edi - 4]
add ecx, 0x23
sub eax, edi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x49973d
push ecx
push edi
call fcn.00516d60
add esp, 8
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
call fcn.0070f5b4
int3