Function at 0x1005f450
Capabilities:
Encode data using xor

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff0
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
sub esp, 0x58
mov eax, dword [0x1010f16c]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
mov edi, ecx
mov dword [ebp - 0x44], edi
mov eax, dword [ebx + 8]
mov dword [ebp - 0x48], eax
mov ecx, dword [eax + 0x20]
mov eax, dword [eax + 0x1c]
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x24], ecx
mov eax, dword [ecx + 8]
mov edx, dword [edi + 0x48]
mov esi, dword [edi + 0x40]
mov dword [ebp - 0x28], eax
mov eax, dword [ecx + 0xc]
mov ecx, dword [ecx + 4]
mov dword [ebp - 0x34], eax
mov eax, dword [edi + 0x54]
and eax, ecx
mov dword [ebp - 0x3c], ecx
lea ecx, [eax*8]
mov eax, dword [ecx + edx]
add edx, 4
add ecx, edx
mov dword [ebp - 0x38], eax
mov edx, dword [ebp - 0x3c]
mov dword [ebp - 0x30], ecx
cmp dword [ebp - 0x38], esi
jne 0x1005f4ca
mov ecx, esi
jmp 0x1005f4ce
mov ecx, dword [ecx]
mov ecx, dword [ecx]
cmp eax, ecx
je 0x1005f4de
cmp dword [eax + 8], edx
je 0x1005f4e0
mov eax, dword [eax]
mov ecx, dword [ebp - 0x30]
jmp 0x1005f4c1
mov eax, esi
cmp eax, esi
je 0x1005f77a
mov esi, dword [eax + 0x10]
mov dword [ebp - 0x3c], esi
test esi, esi
je 0x1005f77a
cmp dword [ebp - 0x34], 0xffffffff
ja 0x1005f77a
jb 0x1005f50f
cmp dword [ebp - 0x28], 0xfffff7ff
jae 0x1005f77a
mov eax, dword [ebp - 0x48]
mov edx, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x40]
add edx, 0x10
mov dword [eax + 0x20], edx
movzx eax, byte [esi + 0x16]
sub ecx, eax
sub ecx, 0x10
mov dword [ebp - 0x4c], ecx
mov ecx, dword [ebp - 0x40]
add ecx, 0xfffffff0
cmp ecx, eax
jb 0x1005f772
sub ecx, eax
mov al, byte [esi + 0x17]
mov dword [ebp - 0x30], ecx
test al, al
jne 0x1005f567
lea eax, [ebp - 0x20]
push eax
lea eax, [esi + 0x68]
push eax
push dword [ebp - 0x34]
push dword [ebp - 0x28]
push 0
push 0
push ecx
mov ecx, dword [ebp - 0x24]
lea ecx, [ecx + 0x10]
call fcn.10065080
add esp, 0x1c
jmp 0x1005f592
dec al
cmp al, 1
jbe 0x1005f772
lea eax, [ebp - 0x20]
mov edx, ecx
mov ecx, dword [ebp - 0x24]
push eax
lea eax, [esi + 0x68]
push eax
push dword [ebp - 0x34]
lea ecx, [ecx + 0x10]
push dword [ebp - 0x28]
sub esp, 8
call fcn.10064ea0
add esp, 0x18
mov cl, byte [esi + 0x16]
mov esi, dword [ebp - 0x30]
add esi, 0x10
mov byte [ebp - 0x29], cl
add esi, dword [ebp - 0x24]
cmp cl, 0x10
jne 0x1005f605
mov ecx, 0x10
mov dword [ebp - 0x24], 0
lea edx, [ebp - 0x20]
lea edi, [ecx - 0xc]
mov eax, dword [esi]
sub ecx, 4
xor eax, dword [edx]
add esi, 4
or dword [ebp - 0x24], eax
add edx, 4
sub edi, 1
jne 0x1005f5b8
mov edi, dword [ebp - 0x44]
mov dword [ebp - 0x30], ecx
test ecx, ecx
je 0x1005f600
mov edi, ecx
nop dword [eax]
movzx eax, byte [esi]
lea esi, [esi + 1]
movzx ecx, byte [edx]
lea edx, [edx + 1]
xor ecx, eax
mov eax, dword [ebp - 0x24]
or eax, ecx
mov dword [ebp - 0x24], eax
sub edi, 1
jne 0x1005f5e0
mov edi, dword [ebp - 0x44]
jmp 0x1005f637
mov eax, dword [ebp - 0x24]
jmp 0x1005f637
push dword [ebp - 0x14]
mov ecx, dword [ebp - 0x3c]
push dword [ebp - 0x18]
push dword [ebp - 0x1c]
lea ecx, [ecx + 0x98]
push dword [ebp - 0x20]
call fcn.10051b80
mov dword [ebp - 0x20], eax
lea ecx, [ebp - 0x20]
movzx eax, byte [ebp - 0x29]
mov dword [ebp - 0x1c], edx
mov edx, esi
push eax
call fcn.100622b0
add esp, 0x14
test eax, eax
sete al
test al, al
je 0x1005f772
mov ecx, dword [ebp - 0x3c]
mov edx, dword [ebp - 0x40]
mov eax, dword [ecx]
add dword [eax + 0xe8], edx
adc dword [eax + 0xec], 0
cmp byte [ecx + 0x14], 0
je 0x1005f77a
mov edx, dword [ebp - 0x28]
lea eax, [ecx + 0xb0]
mov ecx, dword [ebp - 0x34]
shrd edx, ecx, 5
mov dword [ebp - 0x38], eax
shr ecx, 5
mov dword [ebp - 0x30], ecx
mov ecx, eax
mov dword [ebp - 0x24], edx
call fcn.1002c4f0
mov esi, eax
mov ecx, edx
mov eax, dword [ebp - 0x34]
cmp eax, ecx
jb 0x1005f712
ja 0x1005f69e
mov edx, dword [ebp - 0x28]
cmp edx, esi
jb 0x1005f715
mov edx, dword [ebp - 0x30]
add esi, 0x1f
adc ecx, 0
shrd esi, ecx, 5
shr ecx, 5
add esi, 0xffffffff
adc ecx, 0xffffffff
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp - 0x24]
sub ecx, esi
mov eax, ecx
sbb edx, dword [ebp - 0x14]
or eax, edx
je 0x1005f6f5
test edx, edx
jb 0x1005f6d5
ja 0x1005f6d0
cmp ecx, 0x40
jbe 0x1005f6d5
mov ecx, 0x40
mov edx, dword [ebp - 0x38]
nop dword [eax + eax]
lea eax, [esi + ecx]
and eax, 0x3f
mov dword [edx + eax*4 + 8], 0
sub ecx, 1
jne 0x1005f6e0
jmp 0x1005f6f8
mov edx, dword [ebp - 0x38]
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x34]
add eax, 1
adc ecx, 0
push ecx
push eax
mov ecx, edx
call fcn.10005d60
add esp, 8
jmp 0x1005f728
mov edx, dword [ebp - 0x28]
add edx, 0x7e0
adc eax, 0
cmp eax, ecx
jb 0x1005f76a
ja 0x1005f728
cmp edx, esi
jbe 0x1005f76a
mov ecx, dword [ebp - 0x28]
mov esi, 1
mov eax, dword [ebp - 0x24]
and ecx, 0x1f
and eax, 0x3f
shl esi, cl
mov ecx, dword [ebp - 0x38]
mov dword [ebp - 0x24], eax
mov edi, dword [ebp - 0x24]
mov edx, dword [ecx + eax*4 + 8]
mov eax, edx
or eax, esi
mov dword [ecx + edi*4 + 8], eax
mov edi, dword [ebp - 0x44]
test esi, edx
jne 0x1005f76a
push dword [ebp - 0x4c]
mov eax, dword [ebp - 0x3c]
mov ecx, edi
push dword [ebp - 0x48]
push eax
call fcn.1005f180
jmp 0x1005f7a3
inc dword [edi + 0x2280]
jmp 0x1005f780
inc dword [edi + 0x227c]
jmp 0x1005f780
inc dword [edi + 0x2278]
add dword [edi + 0x2268], 1
mov eax, dword [ebp - 0x40]
adc dword [edi + 0x226c], 0
add dword [edi + 0x2270], eax
mov eax, 3
adc dword [edi + 0x2274], 0
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.100908e7
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 4