Function at 0x97db50
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x24
mov eax, dword [0xbd33e0]
mov ebx, dword [esp + 0x44]
xor eax, esp
test ebx, ebx
mov dword [esp + 0x20], eax
mov dword [esp + 0xc], 0
jne 0x97db7c
mov ebx, 0xffffffec
jmp 0x97ddb4
mov esi, dword [esp + 0x38]
mov edi, dword [esp + 0x40]
lea ebp, [esi + 0x158]
push 0x10
push 0
push ebp
call fcn.00985720
add esp, 0xc
lea eax, [esi + 0x168]
push 0x10
push 0
mov dword [esp + 0x10], eax
push eax
call fcn.00985720
add esp, 0xc
mov eax, dword [esp + 0x3c]
cmp ebx, 0xc
mov dword [esi + 0x178], eax
mov dword [esi + 0x144], 0
mov dword [esi + 0x140], 0
mov dword [esi + 0x13c], 0
mov dword [esi + 0x138], 0
jne 0x97dbfd
push 0xc
push edi
push ebp
call fcn.009876a0
add esp, 0xc
mov byte [esi + 0x167], 1
jmp 0x97dd42
mov dword [esp + 4], ebp
lea eax, [esp + 0x10]
push 0x10
push 0
push eax
call fcn.00985720
add esp, 0xc
mov ecx, ebx
mov word [esp + 0x18], 0
mov byte [esp + 0x1a], 0
mov eax, ebx
shr ecx, 0x1d
shl al, 3
mov byte [esp + 0x1b], cl
mov ecx, ebx
shr ecx, 0x15
mov byte [esp + 0x1c], cl
mov ecx, ebx
shr ecx, 0xd
mov byte [esp + 0x1d], cl
mov ecx, ebx
shr ecx, 5
mov byte [esp + 0x1e], cl
mov byte [esp + 0x1f], al
cmp ebx, 0x10
mov ebp, 0x10
cmovb ebp, ebx
xor eax, eax
test ebp, ebp
je 0x97dc6c
movzx ecx, byte [edi + eax]
xor byte [esi + eax + 0x158], cl
inc eax
cmp eax, ebp
jb 0x97dc5c
mov edx, dword [esp + 4]
mov ecx, esi
push edx
call fcn.0097ddd0
add esp, 4
add edi, ebp
sub ebx, ebp
jne 0x97dc4b
mov cl, byte [esp + 0x18]
mov al, byte [esp + 0x10]
mov dl, byte [esp + 0x19]
mov ah, byte [esp + 0x1a]
mov ch, byte [esp + 0x1b]
mov dh, byte [esp + 0x1c]
mov bl, byte [esp + 0x1d]
mov bh, byte [esp + 0x1e]
mov byte [esp + 2], cl
mov cl, byte [esp + 0x1f]
mov byte [esp + 3], cl
xor byte [esi + 0x158], al
mov al, byte [esp + 0x11]
xor byte [esi + 0x159], al
mov al, byte [esp + 0x12]
xor byte [esi + 0x15a], al
mov al, byte [esp + 0x13]
xor byte [esi + 0x15b], al
mov al, byte [esp + 0x14]
xor byte [esi + 0x15c], al
mov al, byte [esp + 0x15]
xor byte [esi + 0x15d], al
mov al, byte [esp + 0x16]
xor byte [esi + 0x15e], al
mov al, byte [esp + 0x17]
xor byte [esi + 0x15f], al
mov al, byte [esp + 2]
xor byte [esi + 0x160], al
xor byte [esi + 0x161], dl
xor byte [esi + 0x162], ah
xor byte [esi + 0x163], ch
xor byte [esi + 0x164], dh
xor byte [esi + 0x165], bl
xor byte [esi + 0x166], bh
mov ecx, esi
mov al, byte [esp + 3]
xor byte [esi + 0x167], al
mov ebp, dword [esp + 4]
mov edx, ebp
push ebp
call fcn.0097ddd0
add esp, 4
lea ecx, [esp + 0xc]
lea eax, [esi + 0x148]
push ecx
push eax
push 0x10
push ebp
push esi
call fcn.00969100
add esp, 0x14
mov ebx, eax
test eax, eax
jne 0x97ddb4
mov edi, dword [esp + 0x4c]
mov dword [esi + 0x144], 0
test edi, edi
mov dword [esi + 0x140], edi
je 0x97ddb2
mov ebx, dword [esp + 0x48]
cmp edi, 0x10
mov ebp, 0x10
cmovb ebp, edi
xor eax, eax
test ebp, ebp
je 0x97dd9d
movzx ecx, byte [ebx + eax]
xor byte [esi + eax + 0x168], cl
inc eax
cmp eax, ebp
jb 0x97dd8d
mov edx, dword [esp + 8]
mov ecx, esi
push edx
call fcn.0097ddd0
add esp, 4
add ebx, ebp
sub edi, ebp
jne 0x97dd7c
xor ebx, ebx
mov ecx, dword [esp + 0x20]
xor ecx, esp
call fcn.00989fe9
mov eax, ebx
add esp, 0x24
pop esi
pop edi
pop ebx
pop ebp
ret