Function at 0x4797d0
Capabilities:
Encode data using xor
Encrypt data using aes
Reference aes constants

Disassembly:
sub esp, 0x1c
mov eax, dword [esp + 0x20]
push ebx
mov ebx, dword [esp + 0x28]
push ebp
mov ebp, ecx
mov dword [esp + 8], eax
push esi
push edi
mov dword [esp + 0x28], ebp
mov ecx, dword [ebp + 0x28]
mov edx, dword [ebp + 0x2c]
mov dword [esp + 0x20], ebx
cmp ecx, 0x120c
je 0x47981d
test edx, edx
je 0x47980e
mov edi, edx
xor al, al
rep stosb byte es:[edi], al
push edx
call fcn.0043ae70
add esp, 4
push 0x120c
call fcn.0047a0b0
add esp, 4
mov edx, eax
mov edi, ebx
mov dword [ebp + 0x2c], edx
shr edi, 2
lea ecx, [ebp + 0x10]
mov dword [ebp + 0x28], 0x120c
mov dword [ebp + 0x24], 0xffffffff
mov dword [ebp + 0x24], 0
lea eax, [edi + 6]
mov dword [esp + 0x14], edi
mov dword [ebp + 0xc], eax
lea eax, [eax*4 + 4]
push eax
mov dword [esp + 0x28], ecx
call fcn.0046a780
mov al, byte [0x4cf95c]
mov esi, dword [ebp + 0x1c]
test al, al
jne 0x47986e
call fcn.00480ca0
mov al, byte [0x4cf95c]
cmp byte [0x4cf962], 0
je 0x4798c2
test al, al
jne 0x479880
call fcn.00480ca0
cmp byte [0x4cf95f], 0
je 0x4798c2
push esi
push ebx
push dword [esp + 0x18]
call fcn.00483b80
mov eax, dword [ebp + 4]
lea ecx, [ebp + 4]
add esp, 0xc
mov eax, dword [eax + 0x20]
call eax
test al, al
jne 0x47a015
push dword [ebp + 0xc]
push dword [ebp + 0x1c]
call fcn.00483b20
add esp, 8
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret 0xc
push ebx
push dword [esp + 0x14]
shl edi, 2
push edi
push esi
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x28], 4
call fcn.0047e7f0
mov eax, edi
sub eax, ebx
push eax
lea eax, [ebx + esi]
push 0
push eax
call fcn.0043dd90
lea eax, [esp + 0x34]
push eax
lea eax, [esp + 0x3c]
push eax
call fcn.00460740
push eax
push esi
push esi
call fcn.00477f40
mov ecx, dword [edi + esi - 4]
lea ebx, [edi + esi]
mov eax, ecx
mov dword [esp + 0x40], 0x4b1534
shr eax, 0x10
add esp, 0x30
movzx eax, al
movzx edx, byte [eax + str.cw]
mov eax, ecx
shr eax, 8
movzx eax, al
shl edx, 8
movzx eax, byte [eax + str.cw]
xor edx, eax
movzx eax, cl
shl edx, 8
shr ecx, 0x18
movzx eax, byte [eax + str.cw]
xor edx, eax
movzx eax, byte [ecx + str.cw]
shl edx, 8
xor edx, eax
xor edx, dword [esi]
xor edx, dword [0x4b1530]
mov dword [ebx], edx
mov eax, dword [esi + 4]
xor eax, edx
mov dword [ebx + 4], eax
mov ecx, dword [esi + 8]
xor ecx, eax
mov eax, dword [esp + 0x14]
lea edx, [eax*4 + 8]
mov dword [edx + esi], ecx
mov dword [esp + 0x1c], edx
lea edx, [eax*4 + 0xc]
mov eax, dword [esi + 0xc]
xor eax, ecx
mov dword [esp + 0x18], edx
mov dword [edx + esi], eax
mov eax, dword [ebp + 0x1c]
mov ecx, dword [ebp + 0x18]
lea ecx, [eax + ecx*4]
lea eax, [esi + 0x10]
add eax, edi
cmp eax, ecx
je 0x479ad5
mov ebp, dword [esp + 0x20]
nop dword [eax]
cmp ebp, 0x18
jne 0x4799c8
mov ecx, dword [esi + 0x24]
xor ecx, dword [esi + 0x10]
mov eax, dword [esi + 0x14]
xor eax, ecx
mov dword [esi + 0x28], ecx
mov dword [esi + 0x2c], eax
jmp 0x479a31
cmp ebp, 0x20
jne 0x479a31
mov ecx, dword [esi + 0x2c]
mov eax, ecx
shr eax, 0x18
movzx edx, byte [eax + str.cw]
mov eax, ecx
shr eax, 0x10
movzx eax, al
shl edx, 8
movzx eax, byte [eax + str.cw]
xor edx, eax
mov eax, ecx
shr eax, 8
movzx eax, al
shl edx, 8
movzx eax, byte [eax + str.cw]
xor edx, eax
movzx eax, cl
mov ecx, dword [esi + 0x18]
shl edx, 8
movzx eax, byte [eax + str.cw]
xor edx, eax
mov eax, dword [esi + 0x14]
xor edx, dword [esi + 0x10]
xor eax, edx
mov dword [esi + 0x30], edx
xor ecx, eax
mov dword [esi + 0x34], eax
mov eax, dword [esi + 0x1c]
xor eax, ecx
mov dword [esi + 0x38], ecx
mov dword [esi + 0x3c], eax
mov eax, dword [esp + 0x14]
mov esi, ebx
mov ecx, dword [esi + eax*4 - 4]
mov edi, ebx
lea ebx, [esi + eax*4]
mov eax, ecx
shr eax, 0x10
movzx eax, al
movzx edx, byte [eax + str.cw]
mov eax, ecx
shr eax, 8
movzx eax, al
shl edx, 8
movzx eax, byte [eax + str.cw]
xor edx, eax
movzx eax, cl
shr ecx, 0x18
shl edx, 8
movzx eax, byte [eax + str.cw]
xor edx, eax
movzx eax, byte [ecx + str.cw]
shl edx, 8
xor edx, eax
mov eax, dword [esp + 0x10]
xor edx, dword [eax]
add eax, 4
xor edx, dword [esi]
mov dword [ebx], edx
mov dword [esp + 0x10], eax
mov eax, dword [esi + 4]
xor eax, edx
mov edx, dword [esp + 0x24]
mov dword [ebx + 4], eax
mov ecx, dword [esi + 8]
xor ecx, eax
mov eax, dword [esp + 0x1c]
mov dword [eax + esi], ecx
mov eax, dword [esi + 0xc]
xor eax, ecx
mov ecx, dword [esp + 0x18]
mov dword [ecx + esi], eax
mov eax, dword [edx + 0xc]
mov ecx, dword [edx + 8]
lea ecx, [eax + ecx*4]
mov eax, dword [esp + 0x14]
add eax, 4
lea eax, [edi + eax*4]
cmp eax, ecx
jne 0x4799b0
mov ebp, dword [esp + 0x28]
mov eax, dword [ebp + 4]
lea ecx, [ebp + 4]
mov edi, dword [ebp + 0x1c]
mov dword [esp + 0x20], edi
mov eax, dword [eax + 0x20]
call eax
test al, al
je 0x479b1b
cmp byte [0x4cf950], 0
jne 0x479af9
call fcn.00478450
push 0x10
push edi
push edi
call fcn.00477f40
mov eax, dword [ebp + 0xc]
shl eax, 4
add eax, edi
push 0x10
push eax
push eax
call fcn.00477f40
add esp, 0x18
jmp 0x479fe7
cmp byte [0x4cf951], 0
jne 0x479b29
call fcn.004782f0
mov eax, dword [ebp + 0xc]
mov esi, 4
mov dword [esp + 0x10], esi
lea ebx, [eax*4 - 4]
cmp ebx, esi
jbe 0x479e1e
lea ebp, [ebx + 2]
lea eax, [edi + 0x18]
lea ebp, [edi + ebp*4]
mov dword [esp + 0x24], eax
mov edi, eax
mov edx, dword [edi - 8]
mov eax, edx
shr eax, 0x18
movzx ecx, byte [eax + str.cw]
mov eax, edx
shr eax, 0x10
movzx eax, al
shr edx, 8
mov esi, dword [ecx*8 + 0x4cf154]
movzx eax, byte [eax + str.cw]
xor esi, dword [eax*8 + 0x4cf151]
movzx eax, dl
mov edx, dword [ebp - 8]
movzx eax, byte [eax + str.cw]
xor esi, dword [eax*8 + 0x4cf152]
movzx eax, byte [edi - 8]
movzx eax, byte [eax + str.cw]
xor esi, dword [eax*8 + 0x4cf153]
mov eax, edx
shr eax, 0x18
movzx ecx, byte [eax + str.cw]
mov eax, edx
shr eax, 0x10
movzx eax, al
shr edx, 8
mov ecx, dword [ecx*8 + 0x4cf154]
movzx eax, byte [eax + str.cw]
xor ecx, dword [eax*8 + 0x4cf151]
movzx eax, dl
movzx eax, byte [eax + str.cw]
xor ecx, dword [eax*8 + 0x4cf152]
movzx eax, byte [ebp - 8]
movzx eax, byte [eax + str.cw]
xor ecx, dword [eax*8 + 0x4cf153]
mov dword [edi - 8], ecx
mov dword [ebp - 8], esi
mov edx, dword [edi - 4]
mov eax, edx
shr eax, 0x18
movzx ecx, byte [eax + str.cw]
mov eax, edx
shr eax, 0x10
movzx eax, al
shr edx, 8
mov esi, dword [ecx*8 + 0x4cf154]
movzx eax, byte [eax + str.cw]
xor esi, dword [eax*8 + 0x4cf151]
movzx eax, dl
mov edx, dword [ebp - 4]
movzx eax, byte [eax + str.cw]
xor esi, dword [eax*8 + 0x4cf152]
movzx eax, byte [edi - 4]
movzx eax, byte [eax + str.cw]
xor esi, dword [eax*8 + 0x4cf153]
mov eax, edx
shr eax, 0x18
movzx ecx, byte [eax + str.cw]
mov eax, edx
shr eax, 0x10
movzx eax, al
shr edx, 8
mov ecx, dword [ecx*8 + 0x4cf154]
movzx eax, byte [eax + str.cw]
xor ecx, dword [eax*8 + 0x4cf151]
movzx eax, dl
movzx eax, byte [eax + str.cw]
xor ecx, dword [eax*8 + 0x4cf152]
movzx eax, byte [ebp - 4]
movzx eax, byte [eax + str.cw]
xor ecx, dword [eax*8 + 0x4cf153]
mov dword [edi - 4], ecx
mov dword [ebp - 4], esi
mov edx, dword [edi]
mov eax, edx
shr eax, 0x18
movzx ecx, byte [eax + str.cw]
mov eax, edx
shr eax, 0x10
movzx eax, al
mov esi, dword [ecx*8 + 0x4cf154]
movzx eax, byte [eax + str.cw]
xor esi, dword [eax*8 + 0x4cf151]
lea edi, [edi + 0x10]
shr edx, 8
lea ebp, [ebp - 0x10]
movzx eax, dl
sub ebx, 4
mov edx, dword [ebp + 0x10]
movzx eax, byte [eax + str.cw]
xor esi, dword [eax*8 + 0x4cf152]
movzx eax, byte [edi - 0x10]
movzx eax, byte [eax + str.cw]
xor esi, dword [eax*8 + 0x4cf153]
mov eax, edx
shr eax, 0x18
movzx ecx, byte [eax + str.cw]
mov eax, edx
shr eax, 0x10
movzx eax, al
shr edx, 8
mov ecx, dword [ecx*8 + 0x4cf154]
movzx eax, byte [eax + str.cw]
xor ecx, dword [eax*8 + 0x4cf151]
movzx eax, dl
movzx eax, byte [eax + str.cw]
xor ecx, dword [eax*8 + 0x4cf152]
movzx eax, byte [ebp + 0x10]
movzx eax, byte [eax + str.cw]
xor ecx, dword [eax*8 + 0x4cf153]
mov dword [edi - 0x10], ecx
mov dword [ebp + 0x10], esi
mov edx, dword [edi - 0xc]
mov eax, edx
shr eax, 0x18
movzx ecx, byte [eax + str.cw]
mov eax, edx
shr eax, 0x10
movzx eax, al
shr edx, 8
mov esi, dword [ecx*8 + 0x4cf154]
movzx eax, byte [eax + str.cw]
xor esi, dword [eax*8 + 0x4cf151]
movzx eax, dl
mov edx, dword [ebp + 0x14]
movzx eax, byte [eax + str.cw]
xor esi, dword [eax*8 + 0x4cf152]
movzx eax, byte [edi - 0xc]
movzx eax, byte [eax + str.cw]
xor esi, dword [eax*8 + 0x4cf153]
mov eax, edx
shr eax, 0x18
movzx ecx, byte [eax + str.cw]
mov eax, edx
shr eax, 0x10
movzx eax, al
shr edx, 8
mov ecx, dword [ecx*8 + 0x4cf154]
movzx eax, byte [eax + str.cw]
xor ecx, dword [eax*8 + 0x4cf151]
movzx eax, dl
movzx eax, byte [eax + str.cw]
xor ecx, dword [eax*8 + 0x4cf152]
movzx eax, byte [ebp + 0x14]
movzx eax, byte [eax + str.cw]
xor ecx, dword [eax*8 + 0x4cf153]
mov dword [edi - 0xc], ecx
mov dword [ebp + 0x14], esi
mov esi, dword [esp + 0x10]
add esi, 4
mov dword [esp + 0x10], esi
cmp esi, ebx
jb 0x479b53
mov ebp, dword [esp + 0x28]
mov edi, dword [esp + 0x20]
mov edx, dword [edi + esi*4]
mov eax, edx
shr eax, 0x18
movzx ecx, byte [eax + str.cw]
mov eax, edx
shr eax, 0x10
movzx eax, al
shr edx, 8
mov ecx, dword [ecx*8 + 0x4cf154]
movzx eax, byte [eax + str.cw]
xor ecx, dword [eax*8 + 0x4cf151]
movzx eax, dl
mov edx, dword [edi + esi*4 + 4]
movzx eax, byte [eax + str.cw]
xor ecx, dword [eax*8 + 0x4cf152]
movzx eax, byte [edi + esi*4]
movzx eax, byte [eax + str.cw]
xor ecx, dword [eax*8 + 0x4cf153]
mov eax, edx
shr eax, 0x18
mov dword [edi + esi*4], ecx
movzx ecx, byte [eax + str.cw]
mov eax, edx
shr eax, 0x10
movzx eax, al
shr edx, 8
mov ecx, dword [ecx*8 + 0x4cf154]
movzx eax, byte [eax + str.cw]
xor ecx, dword [eax*8 + 0x4cf151]
movzx eax, dl
mov edx, dword [edi + esi*4 + 8]
movzx eax, byte [eax + str.cw]
xor ecx, dword [eax*8 + 0x4cf152]
movzx eax, byte [edi + esi*4 + 4]
movzx eax, byte [eax + str.cw]
xor ecx, dword [eax*8 + 0x4cf153]
mov eax, edx
shr eax, 0x18
mov dword [edi + esi*4 + 4], ecx
movzx ecx, byte [eax + str.cw]
mov eax, edx
shr eax, 0x10
movzx eax, al
shr edx, 8
mov ecx, dword [ecx*8 + 0x4cf154]
movzx eax, byte [eax + str.cw]
xor ecx, dword [eax*8 + 0x4cf151]
movzx eax, dl
mov edx, dword [edi + esi*4 + 0xc]
movzx eax, byte [eax + str.cw]
xor ecx, dword [eax*8 + 0x4cf152]
movzx eax, byte [edi + esi*4 + 8]
movzx eax, byte [eax + str.cw]
xor ecx, dword [eax*8 + 0x4cf153]
mov eax, edx
shr eax, 0x18
mov dword [edi + esi*4 + 8], ecx
movzx ecx, byte [eax + str.cw]
mov eax, edx
shr eax, 0x10
movzx eax, al
shr edx, 8
mov ecx, dword [ecx*8 + 0x4cf154]
movzx eax, byte [eax + str.cw]
xor ecx, dword [eax*8 + 0x4cf151]
movzx eax, dl
movzx eax, byte [eax + str.cw]
xor ecx, dword [eax*8 + 0x4cf152]
movzx eax, byte [edi + esi*4 + 0xc]
movzx eax, byte [eax + str.cw]
xor ecx, dword [eax*8 + 0x4cf153]
mov dword [edi + esi*4 + 0xc], ecx
mov eax, dword [ebp + 0xc]
mov ecx, dword [edi]
add eax, eax
bswap ecx
mov eax, dword [edi + eax*8]
bswap eax
mov dword [edi], eax
mov eax, dword [ebp + 0xc]
add eax, eax
mov dword [edi + eax*8], ecx
mov eax, dword [ebp + 0xc]
mov ecx, dword [edi + 4]
add eax, eax
bswap ecx
mov eax, dword [edi + eax*8 + 4]
bswap eax
mov dword [edi + 4], eax
mov eax, dword [ebp + 0xc]
add eax, eax
mov dword [edi + eax*8 + 4], ecx
mov eax, dword [ebp + 0xc]
mov ecx, dword [edi + 8]
add eax, eax
bswap ecx
mov eax, dword [edi + eax*8 + 8]
bswap eax
mov dword [edi + 8], eax
mov eax, dword [ebp + 0xc]
add eax, eax
mov dword [edi + eax*8 + 8], ecx
mov eax, dword [ebp + 0xc]
mov ecx, dword [edi + 0xc]
add eax, eax
bswap ecx
mov eax, dword [edi + eax*8 + 0xc]
bswap eax
mov dword [edi + 0xc], eax
mov eax, dword [ebp + 0xc]
add eax, eax
mov dword [edi + eax*8 + 0xc], ecx
cmp byte [0x4cf95c], 0
jne 0x479ff5
call fcn.00480ca0
cmp byte [0x4cf962], 0
je 0x47a015
mov ecx, dword [ebp + 0xc]
lea eax, [edi + 0x10]
shl ecx, 4
sub ecx, 0x10
push ecx
push eax
push eax
call fcn.00477f40
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret 0xc