Function at 0x10003d10
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x24
push ebx
push ebp
mov ebp, ecx
push esi
push edi
mov cl, byte [ebp + 0x148]
cmp cl, 3
je 0x10003d3a
mov al, byte [ebp + 8]
test al, al
jne 0x10003d3a
pop edi
pop esi
pop ebp
mov eax, 0xfffffffb
pop ebx
add esp, 0x24
ret 0xc
mov eax, dword [esp + 0x3c]
and ecx, 0xff
cdq
and edx, 0x7f
add eax, edx
mov edi, eax
sar edi, 7
dec ecx
mov dword [esp + 0x3c], edi
je 0x10004014
dec ecx
je 0x10003f51
dec ecx
je 0x10003d73
pop edi
pop esi
pop ebp
mov eax, 0xfffffffb
pop ebx
add esp, 0x24
ret 0xc
mov eax, dword [ebp + 0x149]
mov ecx, dword [ebp + 0x14d]
mov edx, dword [ebp + 0x151]
mov dword [esp + 0x14], eax
mov eax, dword [ebp + 0x155]
mov dword [esp + 0x18], ecx
test edi, edi
mov dword [esp + 0x1c], edx
mov dword [esp + 0x20], eax
jle 0x1000403c
mov dword [esp + 0x10], edi
mov edi, dword [esp + 0x40]
xor esi, esi
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
mov dword [esp + 0x2c], eax
lea eax, [ebp + 0x58]
mov dword [esp + 0x24], ecx
mov ecx, dword [esp + 0x20]
mov dword [esp + 0x28], edx
push eax
lea edx, [esp + 0x28]
lea eax, [esp + 0x28]
mov dword [esp + 0x34], ecx
push edx
push eax
mov ecx, ebp
call fcn.10004050
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 cl, byte [esp + 0x20]
mov byte [esp + 0x1e], dl
mov dl, cl
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 ebx, esi
add eax, edx
mov edx, dword [esp + 0x38]
sar eax, 3
and ebx, 7
mov cl, 7
mov dl, byte [eax + edx]
sub cl, bl
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 + edi]
and dl, 0x80
shr dl, cl
xor bl, dl
inc esi
cmp esi, 0x80
mov byte [eax + edi], bl
jl 0x10003dad
mov eax, dword [esp + 0x10]
dec eax
mov dword [esp + 0x10], eax
jne 0x10003dab
mov edi, dword [esp + 0x3c]
mov eax, edi
pop edi
pop esi
pop ebp
shl eax, 7
pop ebx
add esp, 0x24
ret 0xc
mov esi, dword [esp + 0x38]
lea ebx, [ebp + 0x58]
lea eax, [esp + 0x24]
push ebx
push eax
push esi
mov ecx, ebp
call fcn.10004500
mov ecx, dword [ebp + 0x149]
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x40]
xor ecx, edx
mov dword [eax], ecx
mov edx, dword [ebp + 0x14d]
xor edx, dword [esp + 0x28]
mov dword [eax + 4], edx
mov ecx, dword [ebp + 0x151]
xor ecx, dword [esp + 0x2c]
mov dword [eax + 8], ecx
mov edx, dword [ebp + 0x155]
mov ecx, dword [esp + 0x30]
xor edx, ecx
lea ecx, [edi - 1]
test ecx, ecx
mov dword [eax + 0xc], edx
jle 0x1000403c
lea edi, [eax + 0x14]
mov dword [esp + 0x40], ecx
lea eax, [esp + 0x24]
push ebx
push eax
push esi
mov ecx, ebp
call fcn.10004500
mov ecx, dword [esi - 0x10]
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x28]
xor ecx, edx
mov dword [edi - 4], ecx
mov edx, dword [esi - 0xc]
mov ecx, dword [esp + 0x2c]
xor edx, eax
mov dword [edi], edx
mov eax, dword [esi - 8]
xor eax, ecx
add esi, 0x10
mov dword [edi + 4], eax
mov ecx, dword [esi - 0x14]
mov eax, dword [esp + 0x30]
add edi, 0x10
xor ecx, eax
mov eax, dword [esp + 0x40]
mov dword [edi - 8], ecx
dec eax
mov dword [esp + 0x40], eax
jne 0x10003fb3
mov edi, dword [esp + 0x3c]
mov eax, edi
pop edi
pop esi
pop ebp
shl eax, 7
pop ebx
add esp, 0x24
ret 0xc
test edi, edi
jle 0x1000403c
mov esi, dword [esp + 0x38]
mov ebx, edi
mov edi, dword [esp + 0x40]
lea eax, [ebp + 0x58]
mov ecx, ebp
push eax
push edi
push esi
call fcn.10004500
add esi, 0x10
add edi, 0x10
dec ebx
jne 0x10004022
mov edi, dword [esp + 0x3c]
mov eax, edi
pop edi
pop esi
pop ebp
shl eax, 7
pop ebx
add esp, 0x24
ret 0xc