Function at 0x100058f7
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov edx, dword [ebp + 0xc]
push ebx
push esi
push edi
xor edi, edi
mov dword [ebp - 0x10], edi
mov dword [ebp - 8], edi
cmp edx, edi
je 0x10005912
mov byte [edx], 0
cmp eax, edi
jne 0x1000591e
push 0xffffffffffffff9a
pop eax
jmp 0x10005afa
mov esi, dword [eax + 0x54]
cmp esi, edi
je 0x10005916
cmp dword [esi], edi
jne 0x1000592d
push 0xffffffffffffff9c
jmp 0x10005918
cmp ecx, edi
jne 0x10005938
xor eax, eax
jmp 0x10005afa
mov eax, dword [ebp + 8]
mov dword [esi + 0x10], eax
mov eax, dword [esi + 0x5c]
mov dword [esi + 0x14], ecx
cmp ecx, eax
jbe 0x1000594b
mov dword [esi + 0x14], eax
cmp dword [esi + 0x14], edi
jbe 0x10005b25
jmp 0x10005959
mov edx, dword [ebp + 0xc]
xor edi, edi
cmp dword [esi + 8], edi
jne 0x10005a0a
mov eax, dword [esi + 0x58]
cmp eax, edi
jbe 0x10005a0a
mov ecx, 0x4000
mov dword [ebp - 0xc], ecx
cmp eax, ecx
jae 0x10005986
mov dword [ebp - 0xc], eax
cmp eax, edi
je 0x10005aff
mov eax, dword [esi + 0x68]
add eax, dword [esi + 0x3c]
mov ecx, dword [esi + 0x60]
mov ebx, dword [ecx]
push edi
push edi
xor edx, edx
push edx
push eax
push ecx
call dword [ebx + 0x14]
test eax, eax
jne 0x10005b0f
mov eax, dword [esi + 0x60]
mov ecx, dword [eax]
lea edx, [ebp - 0xc]
push edx
push dword [ebp - 0xc]
push dword [esi]
push eax
call dword [ecx + 0xc]
test eax, eax
jne 0x10005b0f
mov eax, dword [ebp - 0xc]
add dword [esi + 0x3c], eax
sub dword [esi + 0x58], eax
cmp byte [esi + 0x6c], 0
mov ebx, dword [esi]
mov dword [esi + 4], ebx
mov dword [esi + 8], eax
je 0x10005a0a
xor edi, edi
test eax, eax
je 0x10005a0a
lea ecx, [esi + 0x70]
mov eax, dword [ecx + 8]
and eax, 0xfffd
or eax, 2
mov edx, eax
xor edx, 1
imul edx, eax
shr edx, 8
xor dl, byte [edi + ebx]
mov byte [ebp - 4], dl
call fcn.10004aa0
mov al, byte [ebp - 4]
mov byte [edi + ebx], al
inc edi
cmp edi, dword [ebp - 0xc]
jb 0x100059dd
mov eax, dword [esi + 0x7c]
mov ecx, dword [esi + 8]
cmp eax, ecx
jbe 0x10005a16
mov eax, ecx
test eax, eax
je 0x10005a3f
mov edx, dword [esi + 4]
lea edi, [edx + eax]
mov dl, byte [edi - 1]
sub dword [esi + 0x5c], eax
sub ecx, eax
sub dword [esi + 0x7c], eax
mov dword [esi + 8], ecx
mov dword [esi + 4], edi
jne 0x10005a3f
cmp dl, byte [esi + 0x80]
jne 0x10005b14
cmp dword [esi + 0x64], 0
jne 0x10005aa5
mov eax, dword [esi + 0x14]
mov edi, dword [esi + 8]
cmp eax, edi
jae 0x10005a51
mov edi, eax
xor eax, eax
test edi, edi
je 0x10005a68
mov ecx, dword [esi + 4]
mov cl, byte [eax + ecx]
mov edx, dword [esi + 0x10]
mov byte [eax + edx], cl
inc eax
cmp eax, edi
jb 0x10005a57
mov ebx, dword [esi + 0x10]
mov eax, dword [esi + 0x50]
mov edx, edi
mov ecx, ebx
call fcn.100049c3
sub dword [esi + 0x5c], edi
sub dword [esi + 8], edi
sub dword [esi + 0x14], edi
add dword [esi + 4], edi
add dword [esi + 0x18], edi
add dword [ebp - 8], edi
mov dword [esi + 0x50], eax
mov eax, dword [esi + 0x5c]
add ebx, edi
mov dword [esi + 0x10], ebx
test eax, eax
jne 0x10005ae7
cmp dword [ebp + 0xc], eax
je 0x10005ae7
mov eax, dword [ebp + 0xc]
mov byte [eax], 1
jmp 0x10005ae7
mov eax, dword [esi + 0x10]
mov ebx, dword [esi + 0x18]
mov dword [ebp - 0xc], eax
lea eax, [esi + 4]
call fcn.10004d46
mov edi, dword [esi + 0x18]
mov ecx, dword [ebp - 0xc]
mov dword [ebp - 0x10], eax
mov eax, dword [esi + 0x50]
sub edi, ebx
mov edx, edi
call fcn.100049c3
sub dword [esi + 0x5c], edi
add dword [ebp - 8], edi
cmp dword [ebp - 0x10], 1
mov dword [esi + 0x50], eax
mov eax, dword [esi + 0x5c]
je 0x10005b1b
test eax, eax
je 0x10005b1b
cmp dword [ebp - 0x10], 0
jne 0x10005af7
cmp dword [esi + 0x14], 0
ja 0x10005956
cmp dword [ebp - 0x10], 0
je 0x10005b25
mov eax, dword [ebp - 0x10]
pop edi
pop esi
pop ebx
leave
ret
cmp edx, edi
je 0x10005931
mov byte [edx], 1
jmp 0x10005931
or eax, 0xffffffff
jmp 0x10005afa
push 0xffffffffffffff96
jmp 0x10005918
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x10005b25
mov byte [eax], 1
mov eax, dword [ebp - 8]
jmp 0x10005afa