Function at 0x497dc4
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x54
push ebx
push esi
mov esi, ecx
push edi
cmp dword [esi + 0x104], 0
mov eax, dword [esi + 0x612c]
mov dword [esi + 0x6154], eax
mov eax, dword [esi + 0x6258]
jne 0x497e62
cmp eax, 0xc
mov eax, dword [esp + 0x68]
jb 0x497e08
cmp eax, 0x20000
jb 0x497e08
push 1
push eax
push dword [esp + 0x6c]
call fcn.00498230
pop edi
pop esi
pop ebx
add esp, 0x54
ret 8
mov edi, dword [esp + 0x64]
lea ebx, [edi + eax]
cmp edi, ebx
je 0x49800d
jmp 0x497e20
mov eax, dword [esi + 0xd0]
push 0xa10
push 0x5dcb0000
push dword [eax + edi + 4]
push dword [eax + edi]
call fcn.00530430
mov eax, dword [esi + 0xe0]
shr edx, 0xe
mov ecx, dword [eax + edx*4]
mov dword [eax + edx*4], edi
mov eax, dword [esi + 0xe4]
mov dword [eax + edi*4], ecx
inc edi
cmp edi, ebx
jne 0x497e20
pop edi
pop esi
pop ebx
add esp, 0x54
ret 8
mov edx, dword [esp + 0x68]
cmp eax, 2
jb 0x497edb
cmp edx, 0x1000
jb 0x497edb
cmp eax, 8
jae 0x497ec6
mov eax, dword [esp + 0x64]
mov ecx, dword [esi + 0x6144]
mov dword [esp + 0x30], eax
lea eax, [esp + 0x2c]
push eax
push 0x498640
mov dword [esp + 0x34], esi
mov dword [esp + 0x3c], edx
call fcn.004be9f0
mov ecx, dword [esi + 0x6144]
lea eax, [esp + 0x2c]
push eax
push 0x4985b0
call fcn.004be9f0
mov ecx, dword [esi + 0x6144]
call fcn.004bebe0
pop edi
pop esi
pop ebx
add esp, 0x54
ret 8
push 0
push edx
push dword [esp + 0x6c]
call fcn.00498230
pop edi
pop esi
pop ebx
add esp, 0x54
ret 8
mov eax, dword [esi + 0x6148]
mov ecx, dword [esp + 0x64]
mov dword [esp + 0x20], eax
mov eax, dword [esi + 0x614c]
mov dword [esp + 0x1c], eax
mov eax, dword [esi + 0x6150]
mov dword [esp + 0x18], eax
lea eax, [ecx + edx]
mov dword [esp + 0x10], ecx
mov dword [esp + 0x28], eax
cmp ecx, eax
je 0x49800d
push ebp
add ecx, dword [esi + 0xd0]
movzx eax, byte [ecx]
movzx edx, byte [ecx + 1]
movzx ebp, byte [ecx + 2]
movzx edi, byte [ecx + 3]
imul eax, eax, 0x2773
movzx ecx, byte [ecx + 4]
xor edx, eax
imul eax, edx, 0x2773
and edx, 0x3fff
add edx, dword [esi + 0xd4]
xor ebp, eax
imul eax, ebp, 0x2773
and ebp, 0x3ffff
xor edi, eax
imul eax, edi, 0x2773
and edi, 0x3ffff
mov dword [esp + 0x28], edi
xor ecx, eax
mov al, byte [edx]
and ecx, dword [esi + 0xec]
mov byte [esp + 0x13], al
mov eax, dword [esi + 0xd8]
mov dword [esp + 0x18], ecx
movzx ebx, word [eax + ebp*2]
mov eax, dword [esi + 0xdc]
mov ecx, dword [eax + edi*4]
mov eax, dword [esi + 0xe0]
mov edi, dword [esp + 0x18]
mov edi, dword [eax + edi*4]
mov eax, dword [esp + 0x14]
mov byte [edx], al
mov eax, dword [esi + 0xd8]
mov edx, dword [esp + 0x14]
mov word [eax + ebp*2], dx
mov eax, dword [esi + 0xdc]
mov edx, dword [esp + 0x28]
mov ebp, dword [esp + 0x14]
mov dword [eax + edx*4], ebp
mov eax, dword [esi + 0xe0]
mov edx, dword [esp + 0x18]
mov dword [eax + edx*4], ebp
mov eax, dword [esp + 0x1c]
mov dword [eax], ecx
add eax, 4
mov ecx, dword [esp + 0x24]
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x20]
mov word [eax], bx
add eax, 2
mov dword [esp + 0x20], eax
mov al, byte [esp + 0x13]
mov byte [ecx], al
inc ecx
mov eax, dword [esi + 0xe4]
mov dword [esp + 0x24], ecx
mov ecx, ebp
mov dword [eax + ecx*4], edi
inc ecx
mov dword [esp + 0x14], ecx
cmp ecx, dword [esp + 0x2c]
jne 0x497f11
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x54
ret 8