Function at 0x404160
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x414058]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, eax
shr esi, 2
push edi
mov edi, edx
lea edx, [esi*4]
sub eax, edx
mov dword [ebp - 0x10], eax
mov eax, dword [ecx]
xor eax, dword [0x412650]
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0xc], eax
movzx ecx, byte [ebp - 0xb]
movzx eax, al
mov dl, byte [eax + 0x412548]
mov al, byte [ecx + 0x412548]
movzx ecx, byte [ebp - 0xa]
movzx ecx, byte [ecx + 0x412548]
mov bl, dl
rol bl, 1
xor al, bl
mov bl, al
rol bl, 1
xor dl, bl
mov byte [ebp - 0xa], cl
movzx ecx, byte [ebp - 9]
mov cl, byte [ecx + 0x412548]
mov byte [ebp - 0xc], dl
mov dl, byte [ebp - 0xa]
mov bl, dl
rol bl, 1
xor cl, bl
mov bl, cl
rol bl, 1
xor dl, bl
mov bl, dl
rol bl, 1
rol bl, 1
xor al, bl
mov byte [ebp - 0xb], al
rol al, 1
rol al, 1
xor dl, al
mov al, byte [ebp - 0xc]
mov byte [ebp - 0xa], dl
mov dl, al
rol dl, 1
rol dl, 1
xor cl, dl
mov byte [ebp - 9], cl
rol cl, 1
rol cl, 1
xor al, cl
mov byte [ebp - 0xc], al
mov eax, dword [ebp - 0xc]
add eax, dword [0x412650]
mov dword [0x417698], 1
mov dword [ebp - 8], eax
test esi, esi
je 0x4042d2
lea edx, [esi + 1]
mov dword [0x417698], edx
mov ecx, dword [edi]
xor ecx, eax
mov dword [ebp - 0xc], ecx
movzx ebx, byte [ebp - 0xa]
movzx ebx, byte [ebx + 0x412548]
mov byte [ebp - 0xa], bl
movzx ebx, byte [ebp - 9]
movzx ebx, byte [ebx + 0x412548]
movzx ecx, cl
mov dl, byte [ecx + 0x412548]
movzx ecx, byte [ebp - 0xb]
mov cl, byte [ecx + 0x412548]
mov byte [ebp - 9], bl
mov bl, dl
rol bl, 1
xor cl, bl
mov bl, cl
rol bl, 1
xor dl, bl
movzx ebx, byte [ebp - 0xa]
rol bl, 1
mov byte [ebp - 0xc], dl
mov dl, byte [ebp - 9]
xor dl, bl
mov byte [ebp - 9], dl
mov bl, dl
mov dl, byte [ebp - 0xa]
rol bl, 1
xor dl, bl
mov bl, dl
rol bl, 1
rol bl, 1
xor cl, bl
mov byte [ebp - 0xb], cl
rol cl, 1
rol cl, 1
xor dl, cl
mov cl, byte [ebp - 9]
mov byte [ebp - 0xa], dl
mov dl, byte [ebp - 0xc]
mov bl, dl
rol bl, 1
rol bl, 1
xor cl, bl
mov byte [ebp - 9], cl
rol cl, 1
rol cl, 1
xor dl, cl
mov byte [ebp - 0xc], dl
add eax, dword [ebp - 0xc]
add edi, 4
dec esi
jne 0x404238
mov dword [ebp - 8], eax
mov ecx, dword [ebp + 8]
and ecx, 7
cmp ecx, 4
ja case.default.0x4042e1
jmp dword [ecx*4 + 0x404514]
mov edx, dword [ebp - 0x10]
push edx
lea eax, [ebp - 0xc]
push edi
push eax
mov dword [ebp - 0xc], 0
call fcn.0040ba80
mov eax, dword [ebp - 8]
xor dword [ebp - 0xc], eax
movzx esi, byte [ebp - 0xa]
movzx ebx, byte [esi + 0x412548]
movzx esi, byte [ebp - 9]
inc dword [0x417698]
movzx ecx, byte [ebp - 0xc]
mov dl, byte [ecx + 0x412548]
movzx ecx, byte [ebp - 0xb]
mov cl, byte [ecx + 0x412548]
mov byte [ebp - 0xa], bl
movzx ebx, byte [esi + 0x412548]
mov byte [ebp - 9], bl
add esp, 0xc
mov bl, dl
rol bl, 1
xor cl, bl
mov bl, cl
rol bl, 1
xor dl, bl
movzx ebx, byte [ebp - 0xa]
rol bl, 1
mov byte [ebp - 0xc], dl
mov dl, byte [ebp - 9]
xor dl, bl
mov byte [ebp - 9], dl
mov bl, dl
mov dl, byte [ebp - 0xa]
rol bl, 1
xor dl, bl
mov bl, dl
rol bl, 1
rol bl, 1
xor cl, bl
mov byte [ebp - 0xb], cl
rol cl, 1
rol cl, 1
xor dl, cl
mov cl, byte [ebp - 9]
mov byte [ebp - 0xa], dl
mov dl, byte [ebp - 0xc]
mov bl, dl
rol bl, 1
rol bl, 1
xor cl, bl
mov byte [ebp - 9], cl
rol cl, 1
rol cl, 1
xor dl, cl
mov byte [ebp - 0xc], dl
add eax, dword [ebp - 0xc]
movzx edx, al
mov dl, byte [edx + 0x412548]
mov dword [ebp - 0xc], eax
jmp 0x4043d1
mov ecx, dword [ebp - 0x10]
test ecx, ecx
je case.0x4042e1.0
push ecx
lea edx, [ebp - 0xc]
push edi
push edx
mov dword [ebp - 0xc], 0
call fcn.0040ba80
mov eax, dword [ebp - 8]
add esp, 0xc
xor dword [ebp - 0xc], eax
movzx ecx, byte [ebp - 0xc]
mov dl, byte [ecx + 0x412548]
movzx esi, byte [ebp - 0xa]
movzx ebx, byte [esi + 0x412548]
movzx esi, byte [ebp - 9]
inc dword [0x417698]
movzx ecx, byte [ebp - 0xb]
mov cl, byte [ecx + 0x412548]
mov byte [ebp - 0xa], bl
movzx ebx, byte [esi + 0x412548]
mov byte [ebp - 9], bl
mov bl, dl
rol bl, 1
xor cl, bl
mov bl, cl
rol bl, 1
xor dl, bl
movzx ebx, byte [ebp - 0xa]
rol bl, 1
mov byte [ebp - 0xc], dl
mov dl, byte [ebp - 9]
xor dl, bl
mov byte [ebp - 9], dl
mov bl, dl
mov dl, byte [ebp - 0xa]
rol bl, 1
xor dl, bl
mov bl, dl
rol bl, 1
rol bl, 1
xor cl, bl
mov byte [ebp - 0xb], cl
rol cl, 1
rol cl, 1
xor dl, cl
mov cl, byte [ebp - 9]
mov byte [ebp - 0xa], dl
mov dl, byte [ebp - 0xc]
mov bl, dl
rol bl, 1
rol bl, 1
xor cl, bl
mov byte [ebp - 9], cl
rol cl, 1
rol cl, 1
xor dl, cl
mov byte [ebp - 0xc], dl
add eax, dword [ebp - 0xc]
mov edx, dword [ebp - 0x14]
mov ecx, dword [edx + 4]
add ecx, dword [0x412654]
mov edx, dword [0x417698]
lea ecx, [ecx + edx + 1]
xor ecx, eax
inc edx
mov dword [ebp - 0xc], ecx
movzx esi, byte [ebp - 0xa]
movzx ebx, byte [esi + 0x412548]
movzx esi, byte [ebp - 9]
mov byte [ebp - 0xa], bl
movzx ebx, byte [esi + 0x412548]
mov dword [0x417698], edx
movzx edx, cl
mov dl, byte [edx + 0x412548]
movzx ecx, byte [ebp - 0xb]
mov cl, byte [ecx + 0x412548]
mov byte [ebp - 9], bl
mov bl, dl
rol bl, 1
xor cl, bl
mov bl, cl
rol bl, 1
xor dl, bl
movzx ebx, byte [ebp - 0xa]
rol bl, 1
mov byte [ebp - 0xc], dl
mov dl, byte [ebp - 9]
xor dl, bl
mov bl, dl
rol bl, 1
mov byte [ebp - 9], dl
mov dl, byte [ebp - 0xa]
xor dl, bl
mov bl, dl
rol bl, 1
rol bl, 1
xor cl, bl
mov byte [ebp - 0xb], cl
rol cl, 1
rol cl, 1
xor dl, cl
mov cl, byte [ebp - 9]
mov byte [ebp - 0xa], dl
mov dl, byte [ebp - 0xc]
mov bl, dl
rol bl, 1
rol bl, 1
xor cl, bl
mov byte [ebp - 9], cl
rol cl, 1
rol cl, 1
xor dl, cl
mov ecx, dword [ebp - 4]
mov byte [ebp - 0xc], dl
mov edx, dword [ebp - 0xc]
add edx, eax
mov eax, dword [ebp - 0x18]
pop edi
pop esi
xor ecx, ebp
mov dword [eax], edx
pop ebx
call fcn.00404528
mov esp, ebp
pop ebp
ret