Function at 0x511270
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0xc
mov edx, 0xc
sub edx, 0x668014
mov dword [esp + 4], edx
push ebx
mov edx, 0x10
sub edx, 0x668014
push ebp
mov dword [esp + 8], edx
push esi
mov ecx, 8
mov esi, eax
mov edx, 0x14
xor eax, eax
sub ecx, 0x668014
sub edx, 0x668014
mov dword [esp + 0x14], edx
mov ebx, dword [eax + 0x668010]
mov edx, dword [edi]
mov dword [eax + edx], ebx
mov ebx, dword [eax + 0x668014]
mov edx, dword [edi]
mov dword [eax + edx + 4], ebx
mov ebp, dword [eax + 0x668018]
mov ebx, dword [edi]
lea edx, [ecx + eax + 0x668014]
mov dword [edx + ebx], ebp
mov ebp, dword [eax + 0x66801c]
mov ebx, dword [edi]
mov edx, dword [esp + 0x10]
lea edx, [edx + eax + 0x668014]
mov dword [edx + ebx], ebp
mov ebp, dword [eax + 0x668020]
mov edx, dword [esp + 0xc]
mov ebx, dword [edi]
lea edx, [edx + eax + 0x668014]
mov dword [edx + ebx], ebp
mov edx, dword [esp + 0x14]
mov ebp, dword [eax + 0x668024]
mov ebx, dword [edi]
lea edx, [edx + eax + 0x668014]
add eax, 0x18
cmp eax, 0x48
mov dword [edx + ebx], ebp
jl 0x5112b2
mov eax, 8
sub eax, 0x66805c
mov dword [esp + 0x14], eax
xor eax, eax
lea ecx, [eax + 0xc]
mov dword [esp + 0x10], 0x40
mov ebx, dword [eax + 0x668058]
mov edx, dword [edi + 4]
mov dword [eax + edx], ebx
mov ebx, dword [eax + 0x66805c]
mov edx, dword [edi + 4]
mov dword [eax + edx + 4], ebx
mov edx, dword [esp + 0x14]
mov ebx, dword [edi + 4]
mov ebp, dword [eax + 0x668060]
lea edx, [edx + eax + 0x66805c]
mov dword [edx + ebx], ebp
mov ebx, dword [eax + 0x668064]
mov edx, dword [edi + 4]
mov dword [ecx + edx], ebx
add eax, 0x10
add ecx, 0x10
sub dword [esp + 0x10], 1
jne 0x511340
cmp eax, 0x1000
jl 0x511335
xor ecx, ecx
mov dword [esp + 0xc], ecx
mov ebp, 0xc
jmp 0x5113a0
mov eax, dword [edi]
lea edx, [eax + ebp - 0xc]
mov dword [esp + 0x14], edx
lea eax, [ecx + 1]
cdq
mov ebx, 0xd
idiv ebx
lea eax, [ecx + 2]
movzx ebx, byte [edx + esi]
mov bh, byte [ecx + esi]
cdq
mov ecx, 0xd
idiv ecx
mov eax, dword [esp + 0xc]
add eax, 3
shl ebx, 8
movzx edx, byte [edx + esi]
or ebx, edx
cdq
idiv ecx
mov eax, dword [esp + 0x14]
shl ebx, 8
movzx edx, byte [edx + esi]
or ebx, edx
xor dword [eax], ebx
mov eax, dword [esp + 0xc]
add eax, 4
cdq
idiv ecx
mov ebx, 0xd
mov ecx, edx
mov edx, dword [edi]
lea eax, [edx + ebp - 8]
mov dword [esp + 0x14], eax
lea eax, [ecx + 1]
cdq
idiv ebx
mov dword [esp + 0xc], ecx
lea eax, [ecx + 2]
movzx ebx, byte [edx + esi]
mov bh, byte [ecx + esi]
cdq
mov ecx, 0xd
idiv ecx
mov eax, dword [esp + 0xc]
add eax, 3
shl ebx, 8
movzx edx, byte [edx + esi]
or ebx, edx
cdq
idiv ecx
mov eax, dword [esp + 0x14]
shl ebx, 8
movzx edx, byte [edx + esi]
or ebx, edx
xor dword [eax], ebx
mov eax, dword [esp + 0xc]
add eax, 4
cdq
idiv ecx
mov ebx, 0xd
mov ecx, edx
mov edx, dword [edi]
lea eax, [edx + ebp - 4]
mov dword [esp + 0x14], eax
lea eax, [ecx + 1]
cdq
idiv ebx
lea eax, [ecx + 2]
mov dword [esp + 0xc], ecx
movzx ebx, byte [edx + esi]
mov bh, byte [ecx + esi]
cdq
mov ecx, 0xd
idiv ecx
mov eax, dword [esp + 0xc]
shl ebx, 8
movzx edx, byte [edx + esi]
or ebx, edx
shl ebx, 8
add eax, 3
cdq
idiv ecx
mov eax, dword [esp + 0x14]
movzx edx, byte [edx + esi]
or ebx, edx
xor dword [eax], ebx
mov eax, dword [esp + 0xc]
add eax, 4
cdq
idiv ecx
mov ebx, 0xd
mov ecx, edx
mov edx, dword [edi]
lea eax, [edx + ebp]
mov dword [esp + 0x14], eax
lea eax, [ecx + 1]
cdq
idiv ebx
mov dword [esp + 0xc], ecx
lea eax, [ecx + 2]
movzx ebx, byte [edx + esi]
mov bh, byte [ecx + esi]
cdq
mov ecx, 0xd
idiv ecx
mov eax, dword [esp + 0xc]
add eax, 3
shl ebx, 8
movzx edx, byte [edx + esi]
or ebx, edx
cdq
idiv ecx
mov eax, dword [esp + 0x14]
shl ebx, 8
movzx edx, byte [edx + esi]
or ebx, edx
xor dword [eax], ebx
mov eax, dword [esp + 0xc]
add eax, 4
cdq
idiv ecx
mov ebx, 0xd
mov ecx, edx
mov edx, dword [edi]
lea eax, [edx + ebp + 4]
mov dword [esp + 0x14], eax
lea eax, [ecx + 1]
cdq
idiv ebx
mov dword [esp + 0xc], ecx
lea eax, [ecx + 2]
movzx ebx, byte [edx + esi]
mov bh, byte [ecx + esi]
cdq
mov ecx, 0xd
idiv ecx
mov eax, dword [esp + 0xc]
add eax, 3
shl ebx, 8
movzx edx, byte [edx + esi]
or ebx, edx
cdq
idiv ecx
mov eax, dword [esp + 0x14]
shl ebx, 8
movzx edx, byte [edx + esi]
or ebx, edx
xor dword [eax], ebx
mov eax, dword [esp + 0xc]
add eax, 4
cdq
idiv ecx
mov ebx, 0xd
mov ecx, edx
mov edx, dword [edi]
lea eax, [edx + ebp + 8]
mov dword [esp + 0x14], eax
lea eax, [ecx + 1]
cdq
mov dword [esp + 0xc], ecx
idiv ebx
movzx ebx, byte [edx + esi]
mov bh, byte [ecx + esi]
lea eax, [ecx + 2]
cdq
mov ecx, 0xd
idiv ecx
mov eax, dword [esp + 0xc]
add eax, 3
shl ebx, 8
add ebp, 0x18
movzx edx, byte [edx + esi]
or ebx, edx
cdq
idiv ecx
mov eax, dword [esp + 0x14]
shl ebx, 8
movzx edx, byte [edx + esi]
or ebx, edx
xor dword [eax], ebx
mov eax, dword [esp + 0xc]
add eax, 4
cdq
idiv ecx
cmp ebp, 0x54
mov ecx, edx
mov dword [esp + 0xc], ecx
jl 0x5113a0
xor ebx, ebx
mov dword [esp + 0xc], ebx
mov dword [esp + 0x10], ebx
xor esi, esi
lea ecx, [ecx]
lea edx, [esp + 0x10]
push edx
lea eax, [esp + 0x10]
push eax
mov eax, edi
call fcn.00510b10
mov ecx, dword [edi]
mov edx, dword [esp + 0xc]
mov dword [esi + ecx], edx
mov eax, dword [edi]
mov ecx, dword [esp + 0x10]
mov dword [esi + eax + 4], ecx
add esi, 8
cmp esi, 0x48
jl 0x5115d0
xor esi, esi
mov edi, edi
mov ebx, 0x80
lea edx, [esp + 0x10]
push edx
lea eax, [esp + 0x10]
push eax
mov eax, edi
call fcn.00510b10
mov ecx, dword [edi + 4]
mov edx, dword [esp + 0xc]
mov dword [esi + ecx], edx
mov eax, dword [edi + 4]
mov ecx, dword [esp + 0x10]
mov dword [esi + eax + 4], ecx
add esi, 8
sub ebx, 1
jne 0x511605
cmp esi, 0x1000
jl 0x511600
pop esi
pop ebp
pop ebx
add esp, 0xc
ret