Function at 0x412630
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x1c
push ebp
mov ebp, dword [esp + 0x24]
xor edx, edx
cmp ecx, 1
push esi
push edi
mov dword [esp + 0x10], edx
mov dword [esp + 0x14], edx
jne 0x412732
cmp eax, 8
mov ecx, dword [ebx + 8]
mov edx, dword [ebx + 0xc]
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], edx
jb 0x41284c
shr eax, 3
lea edi, [ebp + 7]
mov dword [esp + 0x2c], eax
mov edi, edi
movzx eax, byte [ebp]
movzx ecx, byte [edi - 6]
movzx edx, byte [edi - 2]
shl ecx, 0x10
shl eax, 0x18
or eax, ecx
movzx ecx, byte [edi - 5]
shl ecx, 8
or eax, ecx
movzx ecx, byte [edi - 4]
or eax, ecx
movzx ecx, byte [edi - 3]
shl edx, 0x10
shl ecx, 0x18
or ecx, edx
xor edx, edx
mov dh, byte [edi - 1]
mov dword [esp + 0x10], eax
mov dword [esp + 0x20], eax
lea esi, [esp + 0x10]
mov eax, ebx
or ecx, edx
movzx edx, byte [edi]
or ecx, edx
mov dword [esp + 0x14], ecx
mov dword [esp + 0x24], ecx
call fcn.00412240
mov eax, dword [esp + 0x10]
xor eax, dword [esp + 0x18]
mov edx, dword [esp + 0x20]
mov ecx, dword [esp + 0x14]
xor ecx, dword [esp + 0x1c]
mov dword [esp + 0x18], edx
mov edx, dword [esp + 0x24]
add edi, 8
mov dword [esp + 0x1c], edx
mov byte [edi - 8], cl
mov edx, ecx
shr edx, 8
mov byte [edi - 9], dl
mov edx, ecx
shr edx, 0x10
mov byte [edi - 0xa], dl
shr ecx, 0x18
mov byte [edi - 0xb], cl
mov ecx, eax
mov byte [edi - 0xc], al
mov edx, eax
shr ecx, 8
shr edx, 0x10
mov byte [edi - 0xd], cl
shr eax, 0x18
add ebp, 8
sub dword [esp + 0x2c], 1
mov byte [edi - 0xe], dl
mov byte [edi - 0xf], al
jne 0x412670
pop edi
pop esi
pop ebp
add esp, 0x1c
ret 4
cmp ecx, 2
jne 0x4127e1
cmp eax, 8
mov ecx, dword [ebx + 8]
mov edx, dword [ebx + 0xc]
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], edx
jb 0x41284c
shr eax, 3
lea edi, [ebp - 7]
mov dword [esp + 0x2c], eax
lea esp, [esp]
lea eax, [esp + 0x10]
mov ecx, ebp
call fcn.004125c0
lea esi, [esp + 0x18]
mov eax, ebx
call fcn.00411ec0
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
mov esi, ecx
xor ecx, dword [esp + 0x1c]
add edi, 8
mov edx, eax
xor eax, dword [esp + 0x18]
mov dword [esp + 0x18], edx
mov byte [edi + 6], cl
mov edx, ecx
shr edx, 8
mov byte [edi + 5], dl
mov edx, ecx
shr edx, 0x10
mov byte [edi + 4], dl
mov dword [esp + 0x14], ecx
shr ecx, 0x18
mov byte [edi + 3], cl
mov ecx, eax
mov byte [edi + 2], al
mov edx, eax
shr ecx, 8
shr edx, 0x10
mov dword [esp + 0x10], eax
mov byte [edi + 1], cl
shr eax, 0x18
add ebp, 8
sub dword [esp + 0x2c], 1
mov byte [edi], dl
mov dword [esp + 0x1c], esi
mov byte [edi - 1], al
jne 0x412760
pop edi
pop esi
pop ebp
add esp, 0x1c
ret 4
cmp eax, 8
jb 0x41284c
shr eax, 3
lea edi, [ebp - 7]
mov dword [esp + 0x2c], eax
lea eax, [esp + 0x10]
mov ecx, ebp
call fcn.004125c0
lea esi, [esp + 0x10]
mov eax, ebx
call fcn.00412240
mov eax, dword [esp + 0x14]
add edi, 8
mov byte [edi + 6], al
mov ecx, eax
mov edx, eax
shr ecx, 8
mov byte [edi + 5], cl
shr edx, 0x10
mov byte [edi + 4], dl
shr eax, 0x18
mov byte [edi + 3], al
mov eax, dword [esp + 0x10]
mov ecx, eax
mov byte [edi + 2], al
mov edx, eax
shr ecx, 8
shr edx, 0x10
mov byte [edi + 1], cl
shr eax, 0x18
add ebp, 8
sub dword [esp + 0x2c], 1
mov byte [edi], dl
mov byte [edi - 1], al
jne 0x4127f0
pop edi
pop esi
pop ebp
add esp, 0x1c
ret 4