Function at 0x4121f0
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x20
push ebx
mov ebx, dword [esp + 0x28]
push ebp
push esi
mov al, byte [ebx + 0x148]
push edi
cmp al, 9
je 0x412212
pop edi
pop esi
pop ebp
mov eax, 0xfffffffb
pop ebx
add esp, 0x20
ret
mov cl, byte [ebx]
cmp cl, 5
je 0x41222c
cmp byte [ebx + 1], 1
jne 0x41222c
pop edi
pop esi
pop ebp
mov eax, 0xfffffffa
pop ebx
add esp, 0x20
ret
mov edi, dword [esp + 0x38]
test edi, edi
je 0x41252e
mov eax, dword [esp + 0x3c]
test eax, eax
jle 0x41252e
cdq
and edx, 0x7f
add eax, edx
mov esi, eax
movsx eax, cl
sar esi, 7
sub eax, 3
mov dword [esp + 0x3c], esi
je 0x4124f9
dec eax
je 0x41244c
dec eax
je 0x412274
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x20
ret
mov eax, dword [ebx + 0x44]
mov ecx, dword [ebx + 0x48]
mov edx, dword [ebx + 0x4c]
mov dword [esp + 0x10], eax
mov eax, dword [ebx + 0x50]
mov dword [esp + 0x14], ecx
test esi, esi
mov dword [esp + 0x18], edx
mov dword [esp + 0x1c], eax
jle 0x412521
mov ebp, dword [esp + 0x40]
mov dword [esp + 0x38], esi
xor esi, esi
jmp 0x4122b0
mov ebx, dword [esp + 0x34]
xor esi, esi
jmp 0x4122b0
mov ebx, dword [esp + 0x34]
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x24], edx
mov dword [esp + 0x28], eax
lea edx, [esp + 0x20]
lea eax, [esp + 0x20]
mov dword [esp + 0x20], ecx
mov ecx, dword [esp + 0x1c]
push edx
push eax
push ebx
mov dword [esp + 0x38], ecx
call fcn.00412af0
mov al, byte [esp + 0x1d]
mov dl, byte [esp + 0x1c]
mov cl, al
add esp, 0xc
shr cl, 7
shl dl, 1
or cl, dl
mov byte [esp + 0x10], cl
mov cl, byte [esp + 0x12]
mov dl, cl
shr dl, 7
shl al, 1
or dl, al
mov al, byte [esp + 0x13]
mov byte [esp + 0x11], dl
mov dl, al
shr dl, 7
shl cl, 1
or dl, cl
mov cl, byte [esp + 0x14]
mov byte [esp + 0x12], dl
mov dl, cl
shr dl, 7
shl al, 1
or dl, al
mov al, byte [esp + 0x15]
mov byte [esp + 0x13], dl
mov dl, al
shr dl, 7
shl cl, 1
or dl, cl
mov cl, byte [esp + 0x16]
mov byte [esp + 0x14], dl
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
mov ebx, esi
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]
shr al, 7
shl cl, 1
or al, cl
mov byte [esp + 0x1d], dl
mov byte [esp + 0x1e], al
mov eax, esi
cdq
and edx, 7
and ebx, 7
add eax, edx
mov cl, 7
sar eax, 3
sub cl, bl
mov dl, byte [eax + edi]
shr dl, cl
mov cl, byte [esp + 0x1f]
shl cl, 1
and dl, 1
or dl, cl
mov cl, bl
mov byte [esp + 0x1f], dl
mov dl, byte [esp + 0x20]
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 0x4122ac
mov eax, dword [esp + 0x38]
dec eax
mov dword [esp + 0x38], eax
jne 0x4122a4
mov esi, dword [esp + 0x3c]
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
shl eax, 7
add esp, 0x20
ret
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 + 0x14], eax
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], edx
jle 0x412521
mov dword [esp + 0x34], esi
mov esi, dword [esp + 0x40]
lea eax, [esp + 0x20]
push eax
push edi
push ebx
call fcn.00412fb0
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x20]
xor eax, ebp
mov ebp, dword [esp + 0x24]
xor ecx, edx
mov edx, dword [esp + 0x34]
mov dword [esp + 0x2c], eax
xor edx, ebp
mov ebp, dword [esp + 0x28]
xor dword [esp + 0x38], ebp
mov ebp, dword [edi]
mov dword [esi], eax
mov eax, dword [edi + 4]
mov dword [esp + 0x30], ecx
mov dword [esi + 4], ecx
mov ecx, dword [edi + 8]
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x38]
mov dword [esp + 0x34], edx
mov dword [esi + 8], edx
mov edx, dword [edi + 0xc]
mov dword [esi + 0xc], eax
mov eax, dword [esp + 0x40]
add esp, 0xc
add edi, 0x10
add esi, 0x10
dec eax
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], edx
mov dword [esp + 0x34], eax
jne 0x412474
mov esi, dword [esp + 0x3c]
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
shl eax, 7
add esp, 0x20
ret
test esi, esi
jle 0x412521
mov ebp, dword [esp + 0x40]
mov dword [esp + 0x34], esi
push ebp
push edi
push ebx
call fcn.00412fb0
mov eax, dword [esp + 0x40]
add esp, 0xc
add edi, 0x10
add ebp, 0x10
dec eax
mov dword [esp + 0x34], eax
jne 0x412505
mov eax, esi
pop edi
pop esi
pop ebp
shl eax, 7
pop ebx
add esp, 0x20
ret
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x20
ret