Function at 0x511230
Capabilities:
Encode data using xor

Disassembly:
mov eax, 0x10
call fcn.00580860
mov edx, dword [esp + 0x14]
test edx, edx
je 0x51192f
push ebp
mov ebp, dword [esp + 0x1c]
test ebp, ebp
je 0x51192e
push esi
mov esi, dword [esp + 0x24]
test esi, esi
je 0x51192d
mov eax, dword [esi + 0x110]
cmp eax, 0xc
je 0x511279
cmp eax, 0xe
je 0x511279
cmp eax, 0x10
jne 0x51192d
movzx ecx, byte [edx]
movzx eax, byte [edx + 1]
shl ecx, 8
xor ecx, eax
movzx eax, byte [edx + 2]
shl ecx, 8
xor ecx, eax
movzx eax, byte [edx + 3]
shl ecx, 8
xor ecx, eax
movzx eax, byte [edx + 5]
xor ecx, dword [esi]
mov dword [esp + 0x10], ecx
movzx ecx, byte [edx + 4]
shl ecx, 8
xor ecx, eax
movzx eax, byte [edx + 6]
shl ecx, 8
xor ecx, eax
movzx eax, byte [edx + 7]
shl ecx, 8
xor ecx, eax
movzx eax, byte [edx + 9]
xor ecx, dword [esi + 4]
push ebx
movzx ebx, byte [edx + 8]
mov dword [esp + 0x18], ecx
movzx ecx, byte [edx + 0xc]
shl ebx, 8
xor ebx, eax
shl ecx, 8
movzx eax, byte [edx + 0xa]
shl ebx, 8
xor ebx, eax
movzx eax, byte [edx + 0xb]
shl ebx, 8
xor ebx, eax
movzx eax, byte [edx + 0xd]
xor ebx, dword [esi + 8]
xor ecx, eax
movzx eax, byte [edx + 0xe]
shl ecx, 8
xor ecx, eax
movzx eax, byte [edx + 0xf]
shl ecx, 8
mov edx, ebx
xor ecx, eax
shr edx, 0x18
xor ecx, dword [esi + 0xc]
lea eax, [esi + 0x10]
mov dword [esp + 0x20], ecx
mov dword [esp + 0xc], eax
mov eax, ebx
shr eax, 0x10
movzx ecx, al
mov eax, dword [edx*4 + 0x60f568]
push edi
xor eax, dword [ecx*4 + 0x60f968]
mov ecx, ebx
shr ecx, 8
movzx ecx, cl
xor eax, dword [ecx*4 + 0x60fd68]
movzx ecx, bl
mov ebx, dword [esp + 0x24]
mov edx, ebx
shr edx, 0x18
xor eax, dword [ecx*4 + 0x610168]
mov ecx, ebx
shr ecx, 0x10
mov edi, dword [edx*4 + 0x60f568]
movzx ecx, cl
xor edi, dword [ecx*4 + 0x60f968]
mov ecx, ebx
shr ecx, 8
movzx ecx, cl
xor edi, dword [ecx*4 + 0x60fd68]
movzx ecx, bl
mov ebx, dword [esp + 0x1c]
mov edx, ebx
xor edi, dword [ecx*4 + 0x610168]
shr edx, 0x18
mov esi, dword [edx*4 + 0x60f568]
mov ecx, ebx
shr ecx, 0x10
movzx ecx, cl
xor esi, dword [ecx*4 + 0x60f968]
mov ecx, ebx
shr ecx, 8
movzx ecx, cl
xor esi, dword [ecx*4 + 0x60fd68]
movzx ecx, bl
mov ebx, dword [esp + 0x18]
mov edx, ebx
shr edx, 0x18
xor esi, dword [ecx*4 + 0x610168]
mov ecx, ebx
shr ecx, 0x10
xor esi, eax
mov edx, dword [edx*4 + 0x60f568]
xor eax, edi
movzx ecx, cl
xor edi, esi
xor edx, dword [ecx*4 + 0x60f968]
mov ecx, ebx
shr ecx, 8
movzx ecx, cl
xor edx, dword [ecx*4 + 0x60fd68]
movzx ecx, bl
mov ebx, edi
and ebx, 0xff0000
xor edx, dword [ecx*4 + 0x610168]
mov ecx, edi
shr ecx, 0x10
xor edx, esi
xor ebx, ecx
xor eax, edx
mov ecx, edi
shr ebx, 8
and ecx, 0xff00
shl edi, 0x10
xor ecx, edi
xor esi, eax
mov edi, dword [esp + 0x10]
shl ecx, 8
xor ebx, ecx
rol eax, 0x10
mov dword [esp + 0x24], ebx
mov ecx, esi
shl ecx, 8
mov ebx, esi
shr ebx, 8
xor ebx, ecx
shl esi, 8
mov ecx, dword [esp + 0x24]
and ebx, 0xff00ff
xor ebx, esi
mov esi, dword [esp + 0x2c]
xor ebx, eax
xor eax, ecx
xor ecx, ebx
xor edx, ebx
mov dword [esp + 0x24], ecx
xor eax, edx
mov ecx, dword [edi + 4]
xor edx, dword [edi]
xor ecx, eax
xor eax, dword [edi + 8]
xor ebx, ecx
mov ecx, dword [esp + 0x24]
xor ecx, dword [edi + 0xc]
add edi, 0x10
mov dword [esp + 0x24], ecx
mov ecx, dword [esi + 0x110]
sub ecx, 2
mov dword [esp + 0x14], edx
mov dword [esp + 0x18], ebx
test ecx, ecx
jle 0x51176c
dec ecx
mov ebp, edi
shr ecx, 1
inc ecx
mov dword [esp + 0x1c], ecx
mov edx, eax
mov ecx, eax
shr ecx, 0x10
movzx ecx, cl
shr edx, 0x18
mov ebx, dword [edx*4 + 0x60fd68]
xor ebx, dword [ecx*4 + 0x610168]
mov ecx, eax
mov edx, dword [esp + 0x24]
movzx eax, al
shr ecx, 8
movzx ecx, cl
xor ebx, dword [ecx*4 + 0x60f568]
mov ecx, edx
xor ebx, dword [eax*4 + 0x60f968]
mov eax, edx
shr eax, 0x10
movzx eax, al
shr ecx, 0x18
mov esi, dword [ecx*4 + 0x60fd68]
xor esi, dword [eax*4 + 0x610168]
mov eax, edx
shr eax, 8
movzx eax, al
xor esi, dword [eax*4 + 0x60f568]
movzx eax, dl
xor esi, dword [eax*4 + 0x60f968]
mov eax, dword [esp + 0x18]
mov ecx, eax
shr eax, 0x10
movzx eax, al
shr ecx, 0x18
mov edx, dword [ecx*4 + 0x60fd68]
xor edx, dword [eax*4 + 0x610168]
mov ecx, dword [esp + 0x18]
mov eax, ecx
shr eax, 8
movzx eax, al
xor edx, dword [eax*4 + 0x60f568]
movzx eax, cl
xor edx, dword [eax*4 + 0x60f968]
mov eax, dword [esp + 0x14]
xor edx, ebx
mov ecx, eax
xor ebx, esi
shr eax, 0x10
xor esi, edx
movzx eax, al
shr ecx, 0x18
mov ecx, dword [ecx*4 + 0x60fd68]
xor ecx, dword [eax*4 + 0x610168]
mov eax, dword [esp + 0x14]
shr eax, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x60f568]
mov eax, dword [esp + 0x14]
movzx eax, al
xor ecx, dword [eax*4 + 0x60f968]
mov eax, esi
xor ecx, edx
shl eax, 8
xor ebx, ecx
mov dword [esp + 0x18], ecx
xor edx, ebx
mov dword [esp + 0x24], ebx
mov ebx, esi
mov ecx, edx
shr ebx, 8
and ecx, 0xff0000
xor ebx, eax
shl esi, 8
mov eax, edx
and ebx, 0xff00ff
shr eax, 0x10
xor ebx, esi
xor ecx, eax
mov eax, edx
and eax, 0xff00
shl edx, 0x10
shr ecx, 8
xor eax, edx
mov edx, dword [esp + 0x24]
shl eax, 8
xor ecx, eax
mov eax, dword [esp + 0x18]
xor ecx, edx
rol eax, 0x10
xor eax, ecx
xor edx, ebx
xor edx, eax
xor ebx, ecx
xor eax, dword [ebp]
mov dword [esp + 0x18], eax
mov eax, dword [ebp + 4]
xor eax, edx
xor ebx, dword [ebp + 0xc]
xor edx, dword [ebp + 8]
xor ecx, eax
mov dword [esp + 0x14], ecx
mov dword [esp + 0x24], edx
mov eax, dword [esp + 0x24]
shr edx, 0x18
shr eax, 0x10
movzx ecx, al
mov eax, dword [edx*4 + 0x60f568]
mov edx, dword [esp + 0x24]
xor eax, dword [ecx*4 + 0x60f968]
mov ecx, edx
shr ecx, 8
movzx ecx, cl
xor eax, dword [ecx*4 + 0x60fd68]
movzx ecx, dl
mov edx, ebx
shr edx, 0x18
xor eax, dword [ecx*4 + 0x610168]
mov ecx, ebx
mov edi, dword [edx*4 + 0x60f568]
shr ecx, 0x10
movzx ecx, cl
xor edi, dword [ecx*4 + 0x60f968]
mov ecx, ebx
shr ecx, 8
movzx ecx, cl
xor edi, dword [ecx*4 + 0x60fd68]
movzx ecx, bl
mov ebx, dword [esp + 0x14]
mov edx, ebx
shr edx, 0x18
xor edi, dword [ecx*4 + 0x610168]
mov ecx, ebx
shr ecx, 0x10
mov esi, dword [edx*4 + 0x60f568]
movzx ecx, cl
xor esi, dword [ecx*4 + 0x60f968]
mov ecx, ebx
shr ecx, 8
movzx ecx, cl
xor esi, dword [ecx*4 + 0x60fd68]
movzx ecx, bl
mov ebx, dword [esp + 0x18]
mov edx, ebx
shr edx, 0x18
xor esi, dword [ecx*4 + 0x610168]
mov ecx, ebx
shr ecx, 0x10
xor esi, eax
mov edx, dword [edx*4 + 0x60f568]
xor eax, edi
movzx ecx, cl
xor edi, esi
xor edx, dword [ecx*4 + 0x60f968]
mov ecx, ebx
shr ecx, 8
movzx ecx, cl
xor edx, dword [ecx*4 + 0x60fd68]
movzx ecx, bl
mov ebx, edi
xor edx, dword [ecx*4 + 0x610168]
xor edx, esi
xor eax, edx
xor esi, eax
rol eax, 0x10
and ebx, 0xff0000
mov ecx, edi
shr ecx, 0x10
xor ebx, ecx
mov ecx, edi
and ecx, 0xff00
shr ebx, 8
shl edi, 0x10
xor ecx, edi
shl ecx, 8
xor ebx, ecx
mov ecx, esi
mov dword [esp + 0x24], ebx
mov ebx, esi
shl ecx, 8
shr ebx, 8
xor ebx, ecx
shl esi, 8
mov ecx, dword [esp + 0x24]
and ebx, 0xff00ff
xor ebx, esi
xor ebx, eax
xor eax, ecx
xor ecx, ebx
xor edx, ebx
mov dword [esp + 0x24], ecx
xor eax, edx
mov ecx, dword [ebp + 0x14]
xor edx, dword [ebp + 0x10]
xor ecx, eax
xor eax, dword [ebp + 0x18]
xor ebx, ecx
mov ecx, dword [esp + 0x24]
xor ecx, dword [ebp + 0x1c]
add ebp, 0x20
sub dword [esp + 0x1c], 1
mov dword [esp + 0x14], edx
mov dword [esp + 0x18], ebx
mov dword [esp + 0x24], ecx
jne 0x511495
mov dword [esp + 0x10], ebp
mov ebp, dword [esp + 0x28]
mov edi, dword [esp + 0x10]
mov ebx, dword [esp + 0x14]
mov ecx, edx
shr ecx, 0x10
movzx ecx, cl
mov esi, dword [esp + 0x24]
mov ecx, dword [ecx*4 + 0x610168]
shr ecx, 8
movzx edx, cl
mov ecx, ebx
shr ecx, 0x18
movzx ecx, byte [ecx*4 + 0x60fd68]
shl ecx, 8
or edx, ecx
mov ecx, ebx
shr ecx, 8
movzx ecx, cl
shl edx, 8
movzx ecx, byte [ecx*4 + 0x60f568]
or edx, ecx
movzx ecx, bl
shl edx, 8
movzx ecx, byte [ecx*4 + 0x60f968]
or edx, ecx
xor edx, dword [edi]
mov dword [esp + 0x1c], edx
mov edx, dword [esp + 0x18]
mov ecx, edx
shr ecx, 0x10
movzx ecx, cl
mov ecx, dword [ecx*4 + 0x610168]
shr ecx, 8
movzx ebx, cl
mov ecx, edx
shr ecx, 0x18
movzx ecx, byte [ecx*4 + 0x60fd68]
shl ecx, 8
or ebx, ecx
mov ecx, edx
shr ecx, 8
movzx ecx, cl
shl ebx, 8
movzx ecx, byte [ecx*4 + 0x60f568]
or ebx, ecx
movzx ecx, dl
shl ebx, 8
movzx ecx, byte [ecx*4 + 0x60f968]
or ebx, ecx
mov ecx, eax
shr ecx, 0x10
movzx ecx, cl
xor ebx, dword [edi + 4]
mov ecx, dword [ecx*4 + 0x610168]
shr ecx, 8
movzx edx, cl
mov ecx, eax
shr ecx, 0x18
movzx ecx, byte [ecx*4 + 0x60fd68]
shl ecx, 8
or edx, ecx
mov ecx, eax
shr ecx, 8
movzx eax, al
movzx ecx, cl
shl edx, 8
movzx eax, byte [eax*4 + 0x60f968]
movzx ecx, byte [ecx*4 + 0x60f568]
or edx, ecx
shl edx, 8
or edx, eax
mov eax, esi
xor edx, dword [edi + 8]
shr eax, 0x10
movzx eax, al
mov eax, dword [eax*4 + 0x610168]
shr eax, 8
movzx ecx, al
mov eax, esi
shr eax, 0x18
movzx eax, byte [eax*4 + 0x60fd68]
shl eax, 8
or ecx, eax
mov eax, esi
shl ecx, 8
shr eax, 8
movzx eax, al
movzx eax, byte [eax*4 + 0x60f568]
or ecx, eax
mov eax, esi
mov esi, dword [esp + 0x1c]
movzx eax, al
shl ecx, 8
movzx eax, byte [eax*4 + 0x60f968]
or ecx, eax
mov eax, esi
xor ecx, dword [edi + 0xc]
shr eax, 0x18
mov byte [ebp], al
mov eax, esi
shr eax, 0x10
mov byte [ebp + 1], al
mov eax, esi
shr eax, 8
mov byte [ebp + 2], al
mov eax, esi
mov byte [ebp + 3], al
mov eax, ebx
shr eax, 0x18
mov byte [ebp + 4], al
mov eax, ebx
shr eax, 0x10
mov byte [ebp + 5], al
mov eax, ebx
shr eax, 8
mov byte [ebp + 6], al
mov eax, edx
shr eax, 0x18
mov byte [ebp + 8], al
mov eax, edx
shr eax, 0x10
mov byte [ebp + 9], al
mov eax, edx
shr eax, 8
mov byte [ebp + 0xa], al
mov eax, ecx
shr eax, 0x18
mov byte [ebp + 0xc], al
mov eax, ecx
shr eax, 0x10
mov byte [ebp + 0xd], al
mov eax, ecx
shr eax, 8
pop edi
mov byte [ebp + 7], bl
mov byte [ebp + 0xb], dl
mov byte [ebp + 0xe], al
mov byte [ebp + 0xf], cl
pop ebx
pop esi
pop ebp
add esp, 0x10
ret