Function at 0x408ec0
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x20
push ebx
push ebp
mov ebp, dword [esp + 0x2c]
push esi
push edi
cmp byte [ebp + 0x148], 9
je 0x408ee1
pop edi
pop esi
pop ebp
mov eax, 0xfffffffb
pop ebx
add esp, 0x20
ret
cmp byte [ebp + 1], 1
je 0x408ef4
pop edi
pop esi
pop ebp
mov eax, 0xfffffffa
pop ebx
add esp, 0x20
ret
mov esi, dword [esp + 0x38]
test esi, esi
je 0x409204
mov eax, dword [esp + 0x3c]
test eax, eax
jle 0x409204
cdq
and edx, 0x7f
add eax, edx
mov ebx, eax
movsx eax, byte [ebp]
sar ebx, 7
sub eax, 3
mov dword [esp + 0x38], ebx
je 0x4091cf
dec eax
je 0x409120
dec eax
je 0x408f3d
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x20
ret
mov eax, dword [ebp + 0x44]
mov ecx, dword [ebp + 0x48]
mov edx, dword [ebp + 0x4c]
mov dword [esp + 0x10], eax
mov eax, dword [ebp + 0x50]
mov dword [esp + 0x14], ecx
test ebx, ebx
mov dword [esp + 0x18], edx
mov dword [esp + 0x1c], eax
jle 0x4091f7
mov dword [esp + 0x34], ebx
xor edi, edi
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 ebp
mov dword [esp + 0x38], ecx
call fcn.00409b10
mov eax, edi
mov ecx, dword [esp + 0x4c]
cdq
and edx, 7
mov ebx, edi
add eax, edx
mov dl, byte [esp + 0x2c]
sar eax, 3
and ebx, 7
and dl, 0x80
lea esi, [eax + ecx]
mov cl, bl
shr dl, cl
mov al, byte [esi]
mov cl, byte [esp + 0x1d]
shr cl, 7
add esp, 0xc
xor al, dl
mov dl, byte [esp + 0x10]
shl dl, 1
or cl, dl
mov dl, byte [esp + 0x11]
mov byte [esp + 0x10], cl
mov cl, byte [esp + 0x12]
shr cl, 7
shl dl, 1
or cl, dl
mov dl, byte [esp + 0x12]
mov byte [esp + 0x11], cl
mov cl, byte [esp + 0x13]
shr cl, 7
shl dl, 1
or cl, dl
mov dl, byte [esp + 0x13]
mov byte [esp + 0x12], cl
mov cl, byte [esp + 0x14]
shr cl, 7
shl dl, 1
or cl, dl
mov dl, byte [esp + 0x14]
mov byte [esp + 0x13], cl
mov cl, byte [esp + 0x15]
shr cl, 7
shl dl, 1
or cl, dl
mov dl, byte [esp + 0x15]
mov byte [esp + 0x14], cl
mov cl, byte [esp + 0x16]
shr cl, 7
shl dl, 1
or cl, dl
mov dl, byte [esp + 0x16]
mov byte [esp + 0x15], cl
mov cl, byte [esp + 0x17]
shr cl, 7
shl dl, 1
or cl, dl
mov dl, byte [esp + 0x17]
mov byte [esp + 0x16], cl
mov cl, byte [esp + 0x18]
shr cl, 7
shl dl, 1
or cl, dl
mov byte [esi], al
mov byte [esp + 0x17], cl
mov cl, byte [esp + 0x19]
shr cl, 7
mov dl, byte [esp + 0x18]
shl dl, 1
or cl, dl
mov dl, byte [esp + 0x19]
mov byte [esp + 0x18], cl
mov cl, byte [esp + 0x1a]
shr cl, 7
shl dl, 1
or cl, dl
mov dl, byte [esp + 0x1a]
mov byte [esp + 0x19], cl
mov cl, byte [esp + 0x1b]
shr cl, 7
shl dl, 1
or cl, dl
mov dl, byte [esp + 0x1b]
mov byte [esp + 0x1a], cl
mov cl, byte [esp + 0x1c]
shr cl, 7
shl dl, 1
or cl, dl
mov dl, byte [esp + 0x1c]
mov byte [esp + 0x1b], cl
mov cl, byte [esp + 0x1d]
shr cl, 7
shl dl, 1
or cl, dl
mov dl, byte [esp + 0x1d]
mov byte [esp + 0x1c], cl
mov cl, byte [esp + 0x1e]
shr cl, 7
shl dl, 1
or cl, dl
mov dl, byte [esp + 0x1e]
mov byte [esp + 0x1d], cl
mov cl, byte [esp + 0x1f]
shr cl, 7
shl dl, 1
or cl, dl
mov byte [esp + 0x1e], cl
mov cl, 7
sub cl, bl
shr al, cl
mov cl, byte [esp + 0x1f]
shl cl, 1
and al, 1
or al, cl
inc edi
cmp edi, 0x80
mov byte [esp + 0x1f], al
jl 0x408f67
mov eax, dword [esp + 0x34]
dec eax
mov dword [esp + 0x34], eax
jne 0x408f65
mov ebx, dword [esp + 0x38]
pop edi
mov eax, ebx
pop esi
pop ebp
pop ebx
shl eax, 7
add esp, 0x20
ret
mov edx, dword [ebp + 0x44]
mov eax, dword [esi]
mov edi, dword [esi + 4]
mov ecx, dword [ebp + 0x4c]
xor edx, eax
mov eax, dword [ebp + 0x48]
mov dword [esp + 0x20], edx
mov edx, dword [esi + 8]
xor eax, edi
mov edi, dword [esp + 0x40]
xor ecx, edx
mov edx, dword [ebp + 0x50]
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], ecx
mov ecx, dword [esi + 0xc]
lea eax, [esp + 0x20]
push edi
xor edx, ecx
push eax
push ebp
mov dword [esp + 0x38], edx
call fcn.00409b10
lea eax, [ebx - 1]
add esp, 0xc
add esi, 0x10
test eax, eax
jle 0x4091f7
mov dword [esp + 0x40], eax
mov ecx, dword [esi]
mov edx, dword [edi]
mov eax, dword [edi + 4]
xor ecx, edx
mov edx, dword [esi + 4]
mov dword [esp + 0x20], ecx
mov ecx, dword [edi + 8]
xor edx, eax
mov eax, dword [esi + 8]
mov dword [esp + 0x24], edx
mov edx, dword [edi + 0xc]
xor eax, ecx
mov ecx, dword [esi + 0xc]
add edi, 0x10
xor ecx, edx
lea edx, [esp + 0x20]
push edi
push edx
push ebp
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], ecx
call fcn.00409b10
mov eax, dword [esp + 0x4c]
add esp, 0xc
add esi, 0x10
dec eax
mov dword [esp + 0x40], eax
jne 0x409174
pop edi
mov eax, ebx
pop esi
pop ebp
shl eax, 7
pop ebx
add esp, 0x20
ret
test ebx, ebx
jle 0x4091f7
mov edi, dword [esp + 0x40]
mov dword [esp + 0x34], ebx
push edi
push esi
push ebp
call fcn.00409b10
mov eax, dword [esp + 0x40]
add esp, 0xc
add esi, 0x10
add edi, 0x10
dec eax
mov dword [esp + 0x34], eax
jne 0x4091db
pop edi
mov eax, ebx
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