Function at 0x413a30
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x24
push ebx
mov ebx, ecx
push ebp
push esi
mov eax, dword [ebx + 0x38]
push edi
test eax, eax
mov dword [esp + 0x10], ebx
je 0x413a53
pop edi
pop esi
pop ebp
mov eax, 0xfffffffb
pop ebx
add esp, 0x24
ret 0xc
mov ecx, dword [ebx + 0x3c]
cmp ecx, 2
je 0x413a71
mov eax, dword [ebx + 0x40]
test eax, eax
jne 0x413a71
pop edi
pop esi
pop ebp
mov eax, 0xfffffffa
pop ebx
add esp, 0x24
ret 0xc
mov edi, dword [esp + 0x38]
test edi, edi
je 0x413d74
mov eax, dword [esp + 0x3c]
test eax, eax
jle 0x413d74
cdq
and edx, 0x7f
add eax, edx
mov esi, eax
mov eax, ecx
sar esi, 7
sub eax, 0
mov dword [esp + 0x3c], esi
je 0x413d3f
dec eax
je 0x413c92
dec eax
je 0x413aba
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x24
ret 0xc
mov eax, dword [ebx + 0x44]
mov ecx, dword [ebx + 0x48]
mov edx, dword [ebx + 0x4c]
mov dword [esp + 0x14], eax
mov eax, dword [ebx + 0x50]
mov dword [esp + 0x18], ecx
test esi, esi
mov dword [esp + 0x1c], edx
mov dword [esp + 0x20], eax
jle 0x413d65
mov ebp, dword [esp + 0x40]
mov dword [esp + 0x38], esi
xor esi, esi
jmp 0x413af6
mov ebx, dword [esp + 0x10]
xor esi, esi
jmp 0x413af6
mov ebx, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x24], ecx
mov ecx, dword [esp + 0x20]
mov dword [esp + 0x28], edx
mov dword [esp + 0x2c], eax
lea edx, [esp + 0x24]
lea eax, [esp + 0x24]
mov dword [esp + 0x30], ecx
push edx
push eax
mov ecx, ebx
call fcn.00414270
mov al, byte [esp + 0x15]
mov dl, byte [esp + 0x14]
mov cl, al
shr cl, 7
shl dl, 1
or cl, dl
mov byte [esp + 0x14], cl
mov cl, byte [esp + 0x16]
mov dl, cl
shr dl, 7
shl al, 1
or dl, al
mov al, byte [esp + 0x17]
mov byte [esp + 0x15], dl
mov dl, al
shr dl, 7
shl cl, 1
or dl, cl
mov cl, byte [esp + 0x18]
mov byte [esp + 0x16], dl
mov dl, cl
shr dl, 7
shl al, 1
or dl, al
mov al, byte [esp + 0x19]
mov byte [esp + 0x17], dl
mov dl, al
shr dl, 7
shl cl, 1
or dl, cl
mov cl, byte [esp + 0x1a]
mov byte [esp + 0x18], dl
mov dl, cl
shr dl, 7
shl al, 1
or dl, al
mov al, byte [esp + 0x1b]
mov byte [esp + 0x19], dl
mov dl, al
shr dl, 7
shl cl, 1
or dl, cl
mov cl, byte [esp + 0x1c]
mov byte [esp + 0x1a], dl
mov dl, cl
shr dl, 7
shl al, 1
or dl, al
mov al, byte [esp + 0x1d]
mov byte [esp + 0x1b], dl
mov dl, al
shr dl, 7
shl cl, 1
or dl, cl
mov cl, byte [esp + 0x1e]
mov byte [esp + 0x1c], dl
mov dl, cl
shr dl, 7
shl al, 1
or dl, al
mov al, byte [esp + 0x1f]
mov byte [esp + 0x1d], dl
mov dl, al
shr dl, 7
shl cl, 1
or dl, cl
mov byte [esp + 0x1e], dl
mov cl, byte [esp + 0x20]
mov ebx, esi
mov dl, cl
and ebx, 7
shr dl, 7
shl al, 1
or dl, al
mov al, byte [esp + 0x21]
mov byte [esp + 0x1f], dl
mov dl, al
shr dl, 7
shl cl, 1
or dl, cl
mov cl, byte [esp + 0x22]
mov byte [esp + 0x20], dl
mov dl, cl
shr dl, 7
shl al, 1
or dl, al
mov al, byte [esp + 0x23]
shr al, 7
shl cl, 1
or al, cl
mov byte [esp + 0x21], dl
mov byte [esp + 0x22], al
mov eax, esi
cdq
and edx, 7
mov cl, 7
add eax, edx
sub cl, bl
sar eax, 3
mov dl, byte [eax + edi]
shr dl, cl
mov cl, byte [esp + 0x23]
shl cl, 1
and dl, 1
or dl, cl
mov cl, bl
mov byte [esp + 0x23], dl
mov dl, byte [esp + 0x24]
mov bl, byte [eax + ebp]
and dl, 0x80
shr dl, cl
xor bl, dl
inc esi
cmp esi, 0x80
mov byte [eax + ebp], bl
jl 0x413af2
mov eax, dword [esp + 0x38]
dec eax
mov dword [esp + 0x38], eax
jne 0x413aea
mov esi, dword [esp + 0x3c]
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
shl eax, 7
add esp, 0x24
ret 0xc
mov eax, dword [ebx + 0x48]
mov ecx, dword [ebx + 0x4c]
mov edx, dword [ebx + 0x50]
mov ebp, dword [ebx + 0x44]
test esi, esi
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x20], edx
jle 0x413d65
mov dword [esp + 0x38], esi
mov esi, dword [esp + 0x40]
lea eax, [esp + 0x24]
mov ecx, ebx
push eax
push edi
call fcn.00414720
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x18]
xor eax, ebp
mov ebp, dword [esp + 0x1c]
xor ecx, edx
mov edx, dword [esp + 0x2c]
mov dword [esp + 0x24], eax
xor edx, ebp
mov ebp, dword [esp + 0x20]
xor dword [esp + 0x30], ebp
mov ebp, dword [edi]
mov dword [esi], eax
mov eax, dword [edi + 4]
mov dword [esp + 0x28], ecx
mov dword [esi + 4], ecx
mov ecx, dword [edi + 8]
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x30]
mov dword [esp + 0x2c], edx
mov dword [esi + 8], edx
mov edx, dword [edi + 0xc]
mov dword [esi + 0xc], eax
mov eax, dword [esp + 0x38]
add edi, 0x10
add esi, 0x10
dec eax
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x20], edx
mov dword [esp + 0x38], eax
jne 0x413cba
mov esi, dword [esp + 0x3c]
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
shl eax, 7
add esp, 0x24
ret 0xc
test esi, esi
jle 0x413d65
mov ebp, dword [esp + 0x40]
mov dword [esp + 0x38], esi
push ebp
push edi
mov ecx, ebx
call fcn.00414720
mov eax, dword [esp + 0x38]
add edi, 0x10
add ebp, 0x10
dec eax
mov dword [esp + 0x38], eax
jne 0x413d4b
mov eax, esi
pop edi
pop esi
pop ebp
shl eax, 7
pop ebx
add esp, 0x24
ret 0xc
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x24
ret 0xc