Function at 0x1005dbe0
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x18
mov ecx, dword [esi + 0x174]
push ebx
push ebp
push edi
mov edi, eax
mov eax, dword [esi + 0x170]
mov dword [esp + 0x14], ecx
mov ecx, dword [esp + 0x2c]
mov dword [esp + 0x18], eax
xor eax, eax
add ecx, dword [esi + 0x38]
adc eax, dword [esi + 0x3c]
cmp eax, 0xf
ja 0x1005dea4
jb 0x1005dc1c
cmp ecx, 0xffffffe0
ja 0x1005dea4
cmp dword [esi + 0x16c], 0
mov dword [esi + 0x38], ecx
mov dword [esi + 0x3c], eax
je 0x1005dc45
lea edx, [esi + 0x60]
push edx
lea eax, [esi + 0x40]
push eax
call fcn.1005d220
add esp, 8
mov dword [esi + 0x16c], 0
movzx ebx, byte [esi + 0xc]
movzx ecx, byte [esi + 0xd]
movzx edx, byte [esi + 0xe]
movzx eax, byte [esi + 0xf]
mov ebp, dword [esi + 0x168]
shl ebx, 8
or ebx, ecx
shl ebx, 8
or ebx, edx
shl ebx, 8
or ebx, eax
mov dword [esp + 0xc], ebp
test ebp, ebp
je 0x1005dcbd
cmp dword [esp + 0x2c], 0
je 0x1005dca1
mov ecx, dword [esp + 0x28]
mov al, byte [ecx]
dec dword [esp + 0x2c]
inc ecx
mov dword [esp + 0x28], ecx
mov cl, byte [esi + ebp + 0x10]
xor cl, al
mov byte [edi], cl
xor byte [esi + ebp + 0x40], al
inc ebp
inc edi
and ebp, 0xf
jne 0x1005dc72
mov dword [esp + 0xc], ebp
jmp 0x1005dcad
mov dword [esp + 0xc], ebp
test ebp, ebp
jne 0x1005de95
lea edx, [esi + 0x60]
push edx
lea eax, [esi + 0x40]
push eax
call fcn.1005d220
add esp, 8
mov ecx, dword [esp + 0x2c]
cmp ecx, 0xc00
jb 0x1005dd7d
mov eax, 0xaaaaaaab
mul ecx
shr edx, 0xb
lea ebp, [esi + 0x10]
mov dword [esp + 0x20], edx
mov ecx, dword [esp + 0x28]
push 0xc00
lea eax, [esi + 0x60]
push eax
lea eax, [esi + 0x40]
push eax
call fcn.1005d3a0
add esp, 0xc
mov dword [esp + 0x1c], 0xc0
mov ecx, dword [esp + 0x14]
push ecx
push ebp
push esi
call dword [esp + 0x24]
inc ebx
mov edx, ebx
shr edx, 0x18
mov eax, ebx
shr eax, 0x10
mov byte [esi + 0xc], dl
mov edx, dword [esp + 0x34]
mov ecx, ebx
shr ecx, 8
mov byte [esi + 0xd], al
add esp, 0xc
xor eax, eax
sub edx, edi
mov byte [esi + 0xe], cl
mov byte [esi + 0xf], bl
mov ecx, edi
mov dword [esp + 0x10], edx
jmp 0x1005dd44
mov edx, dword [esp + 0x10]
mov edx, dword [edx + ecx]
xor edx, dword [eax + ebp]
add eax, 4
mov dword [ecx], edx
add ecx, 4
cmp eax, 0x10
jb 0x1005dd40
add dword [esp + 0x28], 0x10
add edi, 0x10
sub dword [esp + 0x1c], 1
jne 0x1005dcff
sub dword [esp + 0x2c], 0xc00
sub dword [esp + 0x20], 1
jne 0x1005dcde
mov ebp, dword [esp + 0xc]
mov eax, dword [esp + 0x2c]
and eax, 0xfffffff0
je 0x1005de3a
push eax
lea eax, [esi + 0x60]
push eax
lea ecx, [esi + 0x40]
push ecx
mov ecx, dword [esp + 0x34]
call fcn.1005d3a0
add esp, 0xc
cmp dword [esp + 0x2c], 0x10
jb 0x1005de3a
mov eax, dword [esp + 0x2c]
shr eax, 4
mov dword [esp + 0x1c], eax
mov edx, dword [esp + 0x14]
push edx
lea eax, [esi + 0x10]
push eax
push esi
call dword [esp + 0x24]
inc ebx
mov edx, ebx
shr edx, 8
mov eax, ebx
shr eax, 0x18
mov ecx, ebx
shr ecx, 0x10
mov byte [esi + 0xe], dl
mov edx, dword [esp + 0x34]
mov byte [esi + 0xc], al
add esp, 0xc
mov byte [esi + 0xd], cl
xor eax, eax
mov ecx, edi
sub edx, edi
mov byte [esi + 0xf], bl
mov dword [esp + 0x20], ecx
mov dword [esp + 0x10], edx
jmp 0x1005de04
mov edx, dword [esp + 0x10]
mov edx, dword [ecx + edx]
xor edx, dword [esi + eax + 0x10]
mov ecx, dword [esp + 0x20]
mov dword [ecx], edx
add eax, 4
add ecx, 4
mov dword [esp + 0x20], ecx
cmp eax, 0x10
jb 0x1005de00
mov eax, 0x10
add dword [esp + 0x28], eax
sub dword [esp + 0x2c], eax
add edi, eax
sub dword [esp + 0x1c], 1
jne 0x1005ddb5
cmp dword [esp + 0x2c], 0
je 0x1005de95
mov eax, dword [esp + 0x14]
push eax
lea ecx, [esi + 0x10]
push ecx
push esi
call dword [esp + 0x24]
inc ebx
mov edx, ebx
shr edx, 0x18
mov eax, ebx
shr eax, 0x10
mov byte [esi + 0xc], dl
mov edx, dword [esp + 0x34]
mov ecx, ebx
shr ecx, 8
add esp, 0xc
mov byte [esi + 0xd], al
mov byte [esi + 0xe], cl
mov byte [esi + 0xf], bl
lea eax, [edi + ebp]
sub edx, edi
mov cl, byte [eax + edx]
mov bl, byte [esi + ebp + 0x10]
mov edi, dword [esp + 0x2c]
xor byte [esi + ebp + 0x40], cl
xor bl, cl
dec edi
mov byte [eax], bl
inc ebp
inc eax
mov dword [esp + 0x2c], edi
test edi, edi
jne 0x1005de77
mov dword [esi + 0x168], ebp
xor eax, eax
pop edi
pop ebp
pop ebx
add esp, 0x18
ret
pop edi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x18
ret