Function at 0x412790
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x15c
mov eax, dword [0x4d044c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, ecx
xor esi, esi
mov dword [ebp - 0x158], edi
inc edx
movzx ecx, byte [edx - 1]
lea edx, [edx + 4]
movzx eax, byte [edx - 4]
shl ecx, 8
add ecx, eax
movzx eax, byte [edx - 3]
shl ecx, 8
add ecx, eax
movzx eax, byte [edx - 2]
shl ecx, 8
add ecx, eax
mov dword [ebp + esi*4 - 0x144], ecx
inc esi
cmp esi, 0x10
jb 0x4127b1
cmp esi, 0x50
jae 0x41280c
mov edx, 0x50
lea eax, [ebp + esi*4 - 0x17c]
sub edx, esi
mov ecx, dword [eax + 0x2c]
lea eax, [eax + 4]
xor ecx, dword [eax + 0x14]
xor ecx, dword [eax - 0xc]
xor ecx, dword [eax - 4]
rol ecx, 1
mov dword [eax + 0x34], ecx
sub edx, 1
jne 0x4127f3
mov edx, dword [edi + 0x60]
mov eax, dword [edi + 0x50]
mov ecx, eax
mov ebx, dword [edi + 0x54]
mov esi, dword [edi + 0x58]
mov dword [ebp - 0x14c], edx
mov edx, dword [ebp - 0x158]
mov dword [ebp - 0x15c], eax
mov eax, dword [edi + 0x5c]
xor edi, edi
mov dword [ebp - 0x150], ecx
mov edx, dword [edx + 0x64]
mov dword [ebp - 0x148], eax
mov dword [ebp - 0x154], edx
mov edx, ecx
mov ecx, ebx
not ecx
rol edx, 5
and ecx, eax
mov eax, esi
and eax, ebx
xor ecx, eax
mov eax, dword [ebp - 0x148]
add edx, ecx
add edx, dword [ebp + edi*4 - 0x144]
inc edi
add edx, dword [ebp - 0x154]
add edx, dword [ebp - 0x14c]
mov dword [ebp - 0x14c], eax
mov ecx, edx
mov eax, esi
mov esi, ebx
mov ebx, dword [ebp - 0x150]
ror esi, 2
mov dword [ebp - 0x148], eax
mov dword [ebp - 0x150], ecx
cmp edi, 0x14
jb 0x412846
cmp edi, 0x28
jae 0x4128f5
mov ecx, dword [ebp - 0x158]
mov ecx, dword [ecx + 0x68]
mov dword [ebp - 0x154], ecx
mov ecx, edx
nop
xor eax, esi
rol edx, 5
xor eax, ebx
add edx, eax
mov eax, dword [ebp - 0x148]
add edx, dword [ebp + edi*4 - 0x144]
inc edi
add edx, dword [ebp - 0x154]
add edx, dword [ebp - 0x14c]
mov dword [ebp - 0x14c], eax
mov eax, esi
mov esi, ebx
mov dword [ebp - 0x148], eax
ror esi, 2
mov ebx, ecx
mov ecx, edx
cmp edi, 0x28
jb 0x4128b0
mov dword [ebp - 0x150], edx
cmp edi, 0x3c
jae 0x412961
mov edx, dword [ebp - 0x158]
mov edx, dword [edx + 0x6c]
mov dword [ebp - 0x154], edx
mov edx, ecx
nop dword [eax + eax]
mov ecx, esi
rol edx, 5
xor ecx, ebx
and ecx, eax
mov eax, esi
and eax, ebx
xor ecx, eax
mov eax, dword [ebp - 0x148]
add edx, ecx
add edx, dword [ebp + edi*4 - 0x144]
inc edi
add edx, dword [ebp - 0x154]
add edx, dword [ebp - 0x14c]
mov dword [ebp - 0x14c], eax
mov ecx, edx
mov eax, esi
mov esi, ebx
mov ebx, dword [ebp - 0x150]
ror esi, 2
mov dword [ebp - 0x148], eax
mov dword [ebp - 0x150], ecx
cmp edi, 0x3c
jb 0x412910
cmp edi, 0x50
jae 0x4129bf
mov ecx, dword [ebp - 0x158]
mov edx, dword [ebp - 0x150]
mov ecx, dword [ecx + 0x70]
mov dword [ebp - 0x154], ecx
mov ecx, edx
nop dword [eax]
xor eax, esi
rol ecx, 5
xor eax, ebx
add ecx, eax
mov eax, dword [ebp - 0x148]
add ecx, dword [ebp + edi*4 - 0x144]
inc edi
add ecx, dword [ebp - 0x154]
add ecx, dword [ebp - 0x14c]
mov dword [ebp - 0x14c], eax
mov eax, esi
mov esi, ebx
mov dword [ebp - 0x148], eax
ror esi, 2
mov ebx, edx
mov edx, ecx
cmp edi, 0x50
jb 0x412980
mov eax, dword [ebp - 0x15c]
add eax, ecx
mov ecx, dword [ebp - 0x158]
pop edi
add dword [ecx + 0x54], ebx
add dword [ecx + 0x58], esi
mov dword [ecx + 0x50], eax
mov eax, dword [ebp - 0x148]
add dword [ecx + 0x5c], eax
mov eax, dword [ebp - 0x14c]
add dword [ecx + 0x60], eax
mov ecx, dword [ebp - 4]
pop esi
xor ecx, ebp
pop ebx
call fcn.004606ac
mov esp, ebp
pop ebp
ret