Function at 0x405170
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x18
xor edx, edx
mov dh, byte [ecx + 3]
push ebx
movzx ebx, byte [ecx + 1]
push ebp
push edi
mov dl, byte [ecx + 2]
mov edi, eax
mov eax, dword [edi + 4]
movzx ebp, byte [ecx + 9]
add eax, 4
shl edx, 8
or edx, ebx
movzx ebx, byte [ecx]
shl edx, 8
or edx, ebx
xor edx, dword [eax - 4]
xor ebx, ebx
mov bh, byte [ecx + 7]
mov dword [esp + 0xc], edx
movzx edx, byte [ecx + 5]
add eax, 4
add eax, 4
mov bl, byte [ecx + 6]
add eax, 4
shl ebx, 8
or ebx, edx
movzx edx, byte [ecx + 4]
shl ebx, 8
or ebx, edx
xor edx, edx
mov dh, byte [ecx + 0xb]
xor ebx, dword [eax - 0xc]
mov dword [esp + 0x1c], ebx
mov dl, byte [ecx + 0xa]
shl edx, 8
or edx, ebp
movzx ebp, byte [ecx + 8]
shl edx, 8
or edx, ebp
xor edx, dword [eax - 8]
movzx ebp, byte [ecx + 0xd]
mov dword [esp + 0x10], edx
xor edx, edx
mov dh, byte [ecx + 0xf]
mov dl, byte [ecx + 0xe]
movzx ecx, byte [ecx + 0xc]
shl edx, 8
or edx, ebp
mov ebp, dword [edi]
shl edx, 8
or edx, ecx
xor edx, dword [eax - 4]
sar ebp, 1
sub ebp, 1
test ebp, ebp
mov ecx, edx
mov dword [esp + 0x18], ecx
jle 0x405466
jmp 0x405220
mov edi, dword [esp + 0x10]
shr edi, 0x10
and edi, 0xff
shr ebx, 0x18
movzx edx, ch
mov edx, dword [edx*4 + 0x46c718]
xor edx, dword [edi*4 + 0x46c2f0]
mov edi, dword [esp + 0xc]
xor edx, dword [ebx*4 + 0x46bef0]
and edi, 0xff
xor edx, dword [edi*4 + 0x46cb18]
movzx edi, byte [esp + 0xd]
mov ebx, dword [esp + 0xc]
shr ecx, 0x10
xor edx, dword [eax]
and ecx, 0xff
mov ecx, dword [ecx*4 + 0x46c2f0]
xor ecx, dword [edi*4 + 0x46c718]
mov edi, dword [esp + 0x10]
shr edi, 0x18
xor ecx, dword [edi*4 + 0x46bef0]
mov edi, dword [esp + 0x1c]
and edi, 0xff
xor ecx, dword [edi*4 + 0x46cb18]
movzx edi, byte [esp + 0x1d]
mov edi, dword [edi*4 + 0x46c718]
xor ecx, dword [eax + 4]
shr ebx, 0x10
and ebx, 0xff
xor edi, dword [ebx*4 + 0x46c2f0]
mov ebx, dword [esp + 0x10]
mov dword [esp + 0x14], edi
mov edi, dword [esp + 0x18]
shr edi, 0x18
mov edi, dword [edi*4 + 0x46bef0]
xor dword [esp + 0x14], edi
mov edi, dword [esp + 0x14]
and ebx, 0xff
xor edi, dword [ebx*4 + 0x46cb18]
mov ebx, dword [esp + 0x1c]
add eax, 4
xor edi, dword [eax + 4]
add eax, 4
mov dword [esp + 0x14], edi
movzx edi, byte [esp + 0x11]
mov edi, dword [edi*4 + 0x46c718]
shr ebx, 0x10
and ebx, 0xff
xor edi, dword [ebx*4 + 0x46c2f0]
add eax, 4
mov dword [esp + 0x1c], edi
mov edi, dword [esp + 0xc]
shr edi, 0x18
mov edi, dword [edi*4 + 0x46bef0]
xor dword [esp + 0x1c], edi
mov edi, dword [esp + 0x18]
mov ebx, dword [esp + 0x1c]
and edi, 0xff
xor ebx, dword [edi*4 + 0x46cb18]
add eax, 4
xor ebx, dword [eax - 4]
add eax, 4
mov dword [esp + 0x18], ebx
movzx edi, bh
mov edi, dword [edi*4 + 0x46c718]
mov ebx, dword [esp + 0x14]
shr ebx, 0x10
and ebx, 0xff
xor edi, dword [ebx*4 + 0x46c2f0]
mov ebx, ecx
shr ebx, 0x18
xor edi, dword [ebx*4 + 0x46bef0]
mov ebx, edx
and ebx, 0xff
xor edi, dword [ebx*4 + 0x46cb18]
movzx ebx, dh
xor edi, dword [eax - 4]
mov dword [esp + 0xc], edi
mov edi, dword [esp + 0x18]
shr edi, 0x10
and edi, 0xff
mov edi, dword [edi*4 + 0x46c2f0]
xor edi, dword [ebx*4 + 0x46c718]
mov ebx, dword [esp + 0x14]
shr ebx, 0x18
xor edi, dword [ebx*4 + 0x46bef0]
mov ebx, ecx
and ebx, 0xff
xor edi, dword [ebx*4 + 0x46cb18]
mov ebx, edx
xor edi, dword [eax]
shr ebx, 0x10
mov dword [esp + 0x1c], edi
movzx edi, ch
mov edi, dword [edi*4 + 0x46c718]
and ebx, 0xff
xor edi, dword [ebx*4 + 0x46c2f0]
mov ebx, dword [esp + 0x18]
shr ebx, 0x18
xor edi, dword [ebx*4 + 0x46bef0]
mov ebx, dword [esp + 0x14]
and ebx, 0xff
xor edi, dword [ebx*4 + 0x46cb18]
mov ebx, dword [esp + 0x1c]
xor edi, dword [eax + 4]
add eax, 4
mov dword [esp + 0x10], edi
movzx edi, byte [esp + 0x15]
mov edi, dword [edi*4 + 0x46c718]
shr ecx, 0x10
and ecx, 0xff
xor edi, dword [ecx*4 + 0x46c2f0]
mov ecx, dword [esp + 0x18]
shr edx, 0x18
xor edi, dword [edx*4 + 0x46bef0]
and ecx, 0xff
xor edi, dword [ecx*4 + 0x46cb18]
add eax, 4
xor edi, dword [eax]
sub ebp, 1
add eax, 4
test ebp, ebp
mov dword [esp + 0x18], edi
mov ecx, edi
jg 0x405220
mov edx, dword [esp + 0x10]
shr edx, 0x10
and edx, 0xff
movzx ecx, ch
mov ecx, dword [ecx*4 + 0x46c718]
xor ecx, dword [edx*4 + 0x46c2f0]
mov edx, ebx
shr edx, 0x18
xor ecx, dword [edx*4 + 0x46bef0]
mov edx, dword [esp + 0xc]
and edx, 0xff
xor ecx, dword [edx*4 + 0x46cb18]
movzx edx, byte [esp + 0xd]
xor ecx, dword [eax]
mov ebp, dword [esp + 0xc]
mov dword [esp + 0x20], ecx
mov ecx, dword [esp + 0x18]
shr ecx, 0x10
and ecx, 0xff
mov ecx, dword [ecx*4 + 0x46c2f0]
xor ecx, dword [edx*4 + 0x46c718]
mov edx, dword [esp + 0x10]
shr edx, 0x18
xor ecx, dword [edx*4 + 0x46bef0]
mov edx, ebx
and edx, 0xff
xor ecx, dword [edx*4 + 0x46cb18]
movzx edx, bh
mov edi, dword [edx*4 + 0x46c718]
mov edx, dword [esp + 0x18]
xor ecx, dword [eax + 4]
shr edx, 0x18
shr ebp, 0x10
and ebp, 0xff
xor edi, dword [ebp*4 + 0x46c2f0]
add eax, 4
xor edi, dword [edx*4 + 0x46bef0]
mov edx, dword [esp + 0x10]
and edx, 0xff
xor edi, dword [edx*4 + 0x46cb18]
movzx edx, byte [esp + 0x11]
xor edi, dword [eax + 4]
shr ebx, 0x10
mov dword [esp + 0x14], edi
mov edi, dword [edx*4 + 0x46c718]
and ebx, 0xff
add eax, 4
mov edx, ebx
xor edi, dword [edx*4 + 0x46c2f0]
mov edx, dword [esp + 0xc]
shr edx, 0x18
xor edi, dword [edx*4 + 0x46bef0]
mov edx, dword [esp + 0x18]
and edx, 0xff
xor edi, dword [edx*4 + 0x46cb18]
mov edx, dword [esp + 0x14]
xor edi, dword [eax + 4]
add eax, 4
mov dword [esp + 0x18], edi
shr edx, 0x10
and edx, 0xff
movzx edi, byte [edx + 0x46df18]
mov dword [esp + 0x1c], ebx
xor ebx, ebx
mov edx, ecx
shr edx, 0x18
mov bh, byte [edx + 0x46df18]
mov edx, dword [esp + 0x18]
add eax, 4
xor edi, ebx
movzx ebx, dh
movzx ebx, byte [ebx + 0x46df18]
shl edi, 8
xor edi, ebx
mov ebx, dword [esp + 0x20]
and ebx, 0xff
movzx ebx, byte [ebx + 0x46df18]
shl edi, 8
xor edi, ebx
xor edi, dword [eax]
mov dword [esp + 0xc], edi
shr edx, 0x10
xor ebx, ebx
and edx, 0xff
movzx edi, byte [edx + 0x46df18]
mov edx, dword [esp + 0x14]
shr edx, 0x18
mov bh, byte [edx + 0x46df18]
mov edx, dword [esp + 0x20]
add eax, 4
add eax, 4
xor edi, ebx
shl edi, 8
movzx ebx, dh
movzx ebx, byte [ebx + 0x46df18]
xor edi, ebx
shl edi, 8
mov ebx, ecx
and ebx, 0xff
movzx ebx, byte [ebx + 0x46df18]
xor edi, ebx
xor edi, dword [eax - 4]
xor ebx, ebx
mov dword [esp + 0x1c], edi
mov edi, dword [esp + 0x18]
shr edi, 0x18
mov bh, byte [edi + 0x46df18]
shr edx, 0x10
and edx, 0xff
movzx edx, byte [edx + 0x46df18]
movzx edi, ch
movzx edi, byte [edi + 0x46df18]
xor edx, ebx
shl edx, 8
xor edx, edi
mov edi, dword [esp + 0x14]
and edi, 0xff
movzx edi, byte [edi + 0x46df18]
xor ebx, ebx
shl edx, 8
xor edx, edi
mov edi, dword [esp + 0x20]
xor edx, dword [eax]
shr ecx, 0x10
shr edi, 0x18
mov bh, byte [edi + 0x46df18]
movzx edi, byte [esp + 0x15]
movzx edi, byte [edi + 0x46df18]
and ecx, 0xff
movzx ecx, byte [ecx + 0x46df18]
xor ecx, ebx
shl ecx, 8
xor ecx, edi
mov edi, dword [esp + 0x18]
and edi, 0xff
movzx edi, byte [edi + 0x46df18]
shl ecx, 8
xor ecx, edi
xor ecx, dword [eax + 4]
mov eax, dword [esp + 0xc]
mov ebx, eax
shr ebx, 8
mov byte [esi + 1], bl
mov ebx, eax
mov byte [esi], al
shr eax, 0x18
shr ebx, 0x10
mov byte [esi + 3], al
mov eax, dword [esp + 0x1c]
mov byte [esi + 2], bl
mov ebx, eax
shr ebx, 8
mov byte [esi + 4], al
mov byte [esi + 5], bl
mov ebx, eax
shr eax, 0x18
mov byte [esi + 7], al
shr ebx, 0x10
mov eax, edx
mov byte [esi + 6], bl
mov byte [esi + 8], dl
shr eax, 8
mov byte [esi + 9], al
mov eax, edx
shr eax, 0x10
shr edx, 0x18
mov byte [esi + 0xa], al
mov byte [esi + 0xb], dl
mov edx, ecx
mov eax, ecx
pop edi
shr edx, 8
shr eax, 0x10
mov byte [esi + 0xc], cl
shr ecx, 0x18
pop ebp
mov byte [esi + 0xd], dl
mov byte [esi + 0xe], al
mov byte [esi + 0xf], cl
pop ebx
add esp, 0x18
ret