Function at 0x1005e0e0
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x10
mov eax, dword [esi + 0x174]
mov ecx, dword [esp + 0x1c]
mov dword [esp + 4], eax
xor eax, eax
add ecx, dword [esi + 0x38]
push ebx
adc eax, dword [esi + 0x3c]
push ebp
mov ebp, dword [esp + 0x1c]
push edi
cmp eax, 0xf
ja 0x1005e309
jb 0x1005e114
cmp ecx, 0xffffffe0
ja 0x1005e309
cmp dword [esi + 0x16c], 0
mov dword [esi + 0x38], ecx
mov dword [esi + 0x3c], eax
je 0x1005e13d
lea ecx, [esi + 0x60]
push ecx
lea edx, [esi + 0x40]
push edx
call fcn.1005d220
add esp, 8
mov dword [esi + 0x16c], 0
movzx ebx, byte [esi + 0xc]
movzx eax, byte [esi + 0xd]
movzx ecx, byte [esi + 0xe]
movzx edx, byte [esi + 0xf]
mov edi, dword [esi + 0x168]
shl ebx, 8
or ebx, eax
shl ebx, 8
or ebx, ecx
shl ebx, 8
or ebx, edx
test edi, edi
je 0x1005e1aa
cmp dword [esp + 0x28], 0
je 0x1005e192
mov al, byte [ebp]
mov dl, byte [edi + esi + 0x10]
mov ecx, dword [esp + 0x24]
dec dword [esp + 0x28]
xor dl, al
mov byte [ecx], dl
xor byte [edi + esi + 0x40], al
inc ecx
inc edi
inc ebp
and edi, 0xf
mov dword [esp + 0x24], ecx
jne 0x1005e166
jmp 0x1005e19a
test edi, edi
jne 0x1005e2fa
lea eax, [esi + 0x60]
push eax
lea ecx, [esi + 0x40]
push ecx
call fcn.1005d220
add esp, 8
mov edx, dword [esp + 0x28]
cmp edx, 0xc00
jb 0x1005e22e
mov eax, 0xaaaaaaab
mul edx
shr edx, 0xb
mov dword [esp + 0x14], edx
push 0xc00
lea eax, [esi + 0x60]
push eax
lea eax, [esi + 0x40]
push eax
mov ecx, ebp
call fcn.1005d3a0
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x30]
add esp, 0xc
push esi
push edx
push 0xc0
push eax
push ebp
call dword [esp + 0x40]
add ebx, 0xc0
mov eax, ebx
shr eax, 8
mov byte [esi + 0xe], al
mov eax, 0xc00
add dword [esp + 0x38], eax
sub dword [esp + 0x3c], eax
mov ecx, ebx
mov edx, ebx
shr ecx, 0x18
shr edx, 0x10
add esp, 0x14
add ebp, eax
sub dword [esp + 0x14], 1
mov byte [esi + 0xc], cl
mov byte [esi + 0xd], dl
mov byte [esi + 0xf], bl
jne 0x1005e1c4
mov edx, dword [esp + 0x28]
mov ecx, edx
and ecx, 0xfffffff0
mov dword [esp + 0x18], ecx
je 0x1005e29e
push ecx
mov eax, ecx
lea ecx, [esi + 0x60]
push ecx
lea edx, [esi + 0x40]
shr eax, 4
push edx
mov ecx, ebp
mov dword [esp + 0x20], eax
call fcn.1005d3a0
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x30]
add esp, 0xc
push esi
push eax
push ecx
push edx
push ebp
call dword [esp + 0x40]
add ebx, dword [esp + 0x28]
add esp, 0x14
mov eax, ebx
shr eax, 0x18
mov byte [esi + 0xc], al
mov eax, dword [esp + 0x18]
add dword [esp + 0x24], eax
mov ecx, ebx
mov edx, ebx
shr edx, 8
shr ecx, 0x10
add ebp, eax
sub dword [esp + 0x28], eax
mov byte [esi + 0xe], dl
mov edx, dword [esp + 0x28]
mov byte [esi + 0xd], cl
mov byte [esi + 0xf], bl
test edx, edx
je 0x1005e2fa
mov eax, dword [esp + 0x10]
mov edx, dword [esi + 0x170]
push eax
lea ecx, [esi + 0x10]
push ecx
push esi
call edx
inc ebx
mov ecx, ebx
shr ecx, 0x10
mov eax, ebx
shr eax, 0x18
mov edx, ebx
mov byte [esi + 0xd], cl
mov ecx, dword [esp + 0x30]
shr edx, 8
add esp, 0xc
mov byte [esi + 0xc], al
mov byte [esi + 0xe], dl
mov byte [esi + 0xf], bl
lea eax, [edi + ecx]
sub ebp, ecx
mov cl, byte [eax + ebp]
mov bl, byte [esi + edi + 0x10]
mov edx, dword [esp + 0x28]
xor byte [esi + edi + 0x40], cl
xor bl, cl
dec edx
mov byte [eax], bl
inc edi
inc eax
mov dword [esp + 0x28], edx
test edx, edx
jne 0x1005e2dc
mov dword [esi + 0x168], edi
xor eax, eax
pop edi
pop ebp
pop ebx
add esp, 0x10
ret
pop edi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x10
ret