Function at 0x497848
Capabilities:
Encode data using xor

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xfffffea0
mov dword [esp], eax
mov esi, 0x10
mov eax, dword [esp]
add eax, 0x20
lea edx, [esp + 0x20]
movzx ecx, byte [eax]
shl ecx, 0x18
movzx ebx, byte [eax + 1]
shl ebx, 0x10
or ecx, ebx
movzx ebx, byte [eax + 2]
shl ebx, 8
or ecx, ebx
movzx ebx, byte [eax + 3]
or ecx, ebx
mov dword [edx], ecx
add edx, 4
add eax, 4
dec esi
jne 0x497864
mov esi, 0x40
lea ebx, [esp + 0x54]
mov edx, dword [ebx]
xor edx, dword [ebx - 0x14]
xor edx, dword [ebx - 0x2c]
xor edx, dword [ebx - 0x34]
mov eax, 1
call fcn.00497830
mov dword [ebx + 0xc], eax
add ebx, 4
dec esi
jne 0x497896
mov eax, dword [esp]
mov eax, dword [eax]
mov dword [esp + 8], eax
mov ebx, dword [esp]
mov ebx, dword [ebx + 4]
mov edi, dword [esp]
mov edi, dword [edi + 8]
mov ebp, dword [esp]
mov ebp, dword [ebp + 0xc]
mov eax, dword [esp]
mov eax, dword [eax + 0x10]
mov dword [esp + 0xc], eax
mov esi, 0x14
lea eax, [esp + 0x20]
mov dword [esp + 0x10], eax
mov edx, dword [esp + 8]
mov eax, 5
call fcn.00497830
mov edx, edi
and edx, ebx
mov ecx, ebx
not ecx
and ecx, ebp
or edx, ecx
add eax, edx
add eax, dword [esp + 0xc]
mov edx, dword [esp + 0x10]
add eax, dword [edx]
add eax, dword [0x4aff80]
mov dword [esp + 4], eax
mov dword [esp + 0xc], ebp
mov ebp, edi
mov edx, ebx
mov eax, 0x1e
call fcn.00497830
mov edi, eax
mov ebx, dword [esp + 8]
mov eax, dword [esp + 4]
mov dword [esp + 8], eax
add dword [esp + 0x10], 4
dec esi
jne 0x4978e6
mov esi, 0x14
lea eax, [esp + 0x70]
mov dword [esp + 0x14], eax
mov edx, dword [esp + 8]
mov eax, 5
call fcn.00497830
mov edx, edi
xor edx, ebx
xor edx, ebp
add eax, edx
add eax, dword [esp + 0xc]
mov edx, dword [esp + 0x14]
add eax, dword [edx]
add eax, dword [0x4aff84]
mov dword [esp + 4], eax
mov dword [esp + 0xc], ebp
mov ebp, edi
mov edx, ebx
mov eax, 0x1e
call fcn.00497830
mov edi, eax
mov ebx, dword [esp + 8]
mov eax, dword [esp + 4]
mov dword [esp + 8], eax
add dword [esp + 0x14], 4
dec esi
jne 0x49794b
mov esi, 0x14
lea eax, [esp + 0xc0]
mov dword [esp + 0x18], eax
mov edx, dword [esp + 8]
mov eax, 5
call fcn.00497830
mov edx, edi
and edx, ebx
mov ecx, ebp
and ecx, ebx
or edx, ecx
mov ecx, ebp
and ecx, edi
or edx, ecx
add eax, edx
add eax, dword [esp + 0xc]
mov edx, dword [esp + 0x18]
add eax, dword [edx]
add eax, dword [0x4aff88]
mov dword [esp + 4], eax
mov dword [esp + 0xc], ebp
mov ebp, edi
mov edx, ebx
mov eax, 0x1e
call fcn.00497830
mov edi, eax
mov ebx, dword [esp + 8]
mov eax, dword [esp + 4]
mov dword [esp + 8], eax
add dword [esp + 0x18], 4
dec esi
jne 0x4979ad
mov esi, 0x14
lea eax, [esp + 0x110]
mov dword [esp + 0x1c], eax
mov edx, dword [esp + 8]
mov eax, 5
call fcn.00497830
mov edx, edi
xor edx, ebx
xor edx, ebp
add eax, edx
add eax, dword [esp + 0xc]
mov edx, dword [esp + 0x1c]
add eax, dword [edx]
add eax, dword [0x4aff8c]
mov dword [esp + 4], eax
mov dword [esp + 0xc], ebp
mov ebp, edi
mov edx, ebx
mov eax, 0x1e
call fcn.00497830
mov edi, eax
mov ebx, dword [esp + 8]
mov eax, dword [esp + 4]
mov dword [esp + 8], eax
add dword [esp + 0x1c], 4
dec esi
jne 0x497a19
mov eax, dword [esp]
mov edx, dword [esp + 8]
add dword [eax], edx
mov eax, dword [esp]
add dword [eax + 4], ebx
mov eax, dword [esp]
add dword [eax + 8], edi
mov eax, dword [esp]
add dword [eax + 0xc], ebp
mov eax, dword [esp]
mov edx, dword [esp + 0xc]
add dword [eax + 0x10], edx
mov eax, dword [esp]
xor edx, edx
mov dword [eax + 0x1c], edx
add esp, 0x160
pop ebp
pop edi
pop esi
pop ebx
ret