Function at 0x1001d790
Capabilities:
Encode data using xor

Disassembly:
sub esp, 8
mov eax, dword [esp + 0xc]
push ebx
mov ebx, dword [esp + 0x18]
mov edx, ebx
push ebp
push esi
mov esi, dword [eax + 0x10]
push edi
mov dword [esp + 0x10], esi
mov ebp, dword [esi + 0x48]
xor ebp, ebx
test ebx, ebx
je 0x1001d7cf
mov edi, dword [esp + 0x20]
movzx ecx, byte [edi + edx - 1]
mov eax, ebp
shl eax, 5
add ecx, eax
mov eax, ebp
shr eax, 2
add ecx, eax
xor ebp, ecx
sub edx, 1
jne 0x1001d7b5
mov ecx, dword [esi + 0x20]
mov eax, dword [esi + 0x18]
dec ecx
and ecx, ebp
mov edi, dword [eax + ecx*4]
lea eax, [eax + ecx*4]
mov dword [esp + 0x14], eax
test edi, edi
je 0x1001d84e
movzx eax, byte [edi + 7]
cmp ebx, eax
jne 0x1001d843
mov ecx, dword [esp + 0x20]
lea edx, [edi + 0x10]
mov esi, ebx
sub esi, 4
jb 0x1001d811
nop dword [eax]
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x1001d816
add ecx, 4
add edx, 4
sub esi, 4
jae 0x1001d800
cmp esi, 0xfffffffc
je 0x1001d87f
mov al, byte [ecx]
cmp al, byte [edx]
jne 0x1001d843
cmp esi, 0xfffffffd
je 0x1001d87f
mov al, byte [ecx + 1]
cmp al, byte [edx + 1]
jne 0x1001d843
cmp esi, 0xfffffffe
je 0x1001d87f
mov al, byte [ecx + 2]
cmp al, byte [edx + 2]
jne 0x1001d843
cmp esi, 0xffffffff
je 0x1001d87f
mov al, byte [ecx + 3]
cmp al, byte [edx + 3]
je 0x1001d87f
mov edi, dword [edi + 0xc]
test edi, edi
jne 0x1001d7e6
mov esi, dword [esp + 0x10]
mov eax, dword [esi + 0x1c]
cmp eax, dword [esi + 0x20]
jl 0x1001d921
mov edi, dword [esp + 0x1c]
cmp eax, 0x7fffffff
jne 0x1001d89f
push 1
push edi
call fcn.1001b800
add esp, 8
cmp dword [esi + 0x1c], 0x7fffffff
je 0x1001d96e
jmp 0x1001d89f
mov ecx, dword [esp + 0x10]
mov al, byte [edi + 5]
mov cl, byte [ecx + 0x4c]
xor cl, 0x18
test al, cl
je 0x1001d895
xor al, 0x18
mov byte [edi + 5], al
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret
mov esi, dword [esi + 0x20]
cmp esi, 0x1fffffff
jg 0x1001d90b
mov ebx, dword [edi + 0x10]
add esi, esi
mov edi, dword [ebx + 0x20]
cmp esi, edi
jge 0x1001d8c3
push esi
push edi
push dword [ebx + 0x18]
call fcn.1001de30
add esp, 0xc
lea eax, [esi*4]
push eax
lea eax, [edi*4]
push eax
push dword [ebx + 0x18]
mov eax, dword [esp + 0x28]
push eax
call fcn.10026e40
add esp, 0x10
test eax, eax
jne 0x1001d8f2
cmp esi, edi
jge 0x1001d907
push edi
push esi
push dword [ebx + 0x18]
jmp 0x1001d8ff
mov dword [ebx + 0x18], eax
mov dword [ebx + 0x20], esi
cmp esi, edi
jle 0x1001d907
push esi
push edi
push eax
call fcn.1001de30
add esp, 0xc
mov ebx, dword [esp + 0x24]
mov edi, dword [esp + 0x10]
mov ecx, dword [edi + 0x20]
mov eax, dword [edi + 0x18]
dec ecx
and ecx, ebp
lea eax, [eax + ecx*4]
mov dword [esp + 0x14], eax
jmp 0x1001d925
mov edi, dword [esp + 0x10]
lea eax, [ebx + 0x11]
push eax
push 4
push dword [esp + 0x24]
call fcn.1001b8c0
mov esi, eax
push ebx
push dword [esp + 0x30]
lea ecx, [esi + 0x10]
mov dword [esi + 8], ebp
mov byte [esi + 6], 0
push ecx
mov byte [esi + ebx + 0x10], 0
call fcn.1006f830
mov ecx, dword [esp + 0x2c]
add esp, 0x18
mov byte [esi + 7], bl
mov eax, dword [ecx]
mov dword [esi + 0xc], eax
mov eax, esi
mov dword [ecx], esi
inc dword [edi + 0x1c]
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret
push 4
push edi
call fcn.100149c0
int3