Function at 0x1007fa20
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
mov ebx, dword [ebp + 0x1c]
push esi
push edi
test ebx, ebx
je 0x1007fe21
cmp dword [ebx], 0
jg 0x1007fe21
mov esi, dword [ebp + 8]
test esi, esi
je 0x1007fe1b
cmp dword [ebp + 0x10], 0
jl 0x1007fe1b
jle 0x1007fa5e
cmp dword [ebp + 0xc], 0
je 0x1007fe1b
cmp dword [ebp + 0x14], 0
mov eax, 0x1007f000
push 4
cmovne eax, dword [ebp + 0x14]
cmp byte [esi + 0x22097], 0
mov dword [ebp - 4], eax
pop edi
jne 0x1007fcb7
push esi
call fcn.100d6e93
cmp byte [esi + 0x22096], 0
pop ecx
push 0x20
pop edx
mov ecx, 0x120
mov ebx, edx
cmove ecx, edx
mov edi, edx
mov dword [ebp - 0xc], ecx
cmp dword [esi + 0x22090], edx
jle 0x1007fb1f
mov eax, edi
sar eax, 5
mov dword [ebp - 8], eax
cmp dword [esi + eax*4 + 0x22098], 0
jge 0x1007fabc
add edi, edx
jmp 0x1007fb14
cmp edi, ecx
jl 0x1007fae6
push edx
push edi
push ebx
push dword [esi + 0x22080]
call fcn.100d6e93
add esp, 0x10
mov ecx, eax
mov eax, dword [ebp - 8]
push 0x20
pop edx
test ecx, ecx
js 0x1007fae6
mov dword [esi + eax*4 + 0x22098], ecx
jmp 0x1007fab8
cmp ebx, edi
jge 0x1007fb09
mov dword [esi + eax*4 + 0x22098], ebx
mov ecx, dword [esi + 0x22080]
mov eax, dword [ecx + edi*4]
mov dword [ecx + ebx*4], eax
inc ebx
inc edi
dec edx
test edx, edx
jg 0x1007faf1
push 0x20
pop edx
jmp 0x1007fb14
add ebx, edx
mov dword [esi + eax*4 + 0x22098], edi
mov edi, ebx
mov ecx, dword [ebp - 0xc]
cmp edi, dword [esi + 0x22090]
jl 0x1007faa6
xor ecx, ecx
cmp dword [esi + 0x22088], ecx
jle 0x1007fb47
mov eax, dword [esi + ecx*4]
cdq
xor eax, edx
sub eax, edx
sar eax, 5
mov eax, dword [esi + eax*4 + 0x22098]
mov dword [esi + ecx*4], eax
inc ecx
cmp ecx, dword [esi + 0x22088]
jl 0x1007fb29
mov dword [esi + 0x22090], ebx
mov ebx, dword [ebp + 0x1c]
push ebx
push dword [ebp - 4]
push esi
call fcn.100d6e93
add esp, 0xc
cmp dword [ebx], 0
jg 0x1007fca4
cmp byte [esi + 0x22097], 0
jne 0x1007fca4
push esi
call fcn.100d6e93
cmp byte [esi + 0x22096], 0
mov eax, 0x120
pop ecx
push 0x20
pop ecx
cmove eax, ecx
mov ebx, ecx
mov edi, ecx
mov dword [ebp - 0x14], eax
cmp dword [esi + 0x22090], ecx
jle 0x1007fc73
mov edx, edi
sar edx, 5
mov dword [ebp - 8], edx
cmp dword [esi + edx*4 + 0x22098], 0
jge 0x1007fbb8
add edi, ecx
jmp 0x1007fc64
cmp edi, eax
jl 0x1007fc4a
mov eax, dword [esi + 0x22080]
push 4
push edi
push ebx
push eax
call fcn.100d6e93
mov ecx, eax
add esp, 0x10
test ecx, ecx
js 0x1007fbe8
mov eax, dword [ebp - 8]
push 0x20
mov dword [esi + eax*4 + 0x22098], ecx
pop ecx
jmp 0x1007fbb1
mov eax, dword [esi + 0x22080]
push 0x1c
pop ecx
mov dword [ebp - 4], ecx
lea edx, [eax + edi*4]
lea eax, [eax + ebx*4]
mov dword [ebp - 0x10], edx
add eax, 0xffffff90
mov dword [ebp - 0xc], eax
push ecx
push edx
push eax
call fcn.100d6e93
mov ecx, dword [ebp - 4]
add esp, 0xc
test al, al
jne 0x1007fc2b
mov eax, dword [ebp - 0xc]
sub ecx, 4
mov edx, dword [ebp - 0x10]
add eax, 0x10
mov dword [ebp - 4], ecx
mov dword [ebp - 0xc], eax
test ecx, ecx
jg 0x1007fc03
mov edx, dword [ebp - 8]
push 0x20
test ecx, ecx
jle 0x1007fccd
mov eax, ebx
add edi, ecx
sub eax, ecx
mov dword [esi + edx*4 + 0x22098], eax
pop edx
sub edx, ecx
jmp 0x1007fc5d
xor ecx, ecx
jmp 0x1007fc2e
mov ecx, dword [esi + 0x22080]
mov eax, dword [ecx + edi*4]
mov dword [ecx + ebx*4], eax
inc ebx
inc edi
dec edx
test edx, edx
jg 0x1007fc4e
push 0x20
pop ecx
mov eax, dword [ebp - 0x14]
cmp edi, dword [esi + 0x22090]
jl 0x1007fb9f
xor ecx, ecx
cmp dword [esi + 0x22088], ecx
jle 0x1007fc9b
mov eax, dword [esi + ecx*4]
cdq
xor eax, edx
sub eax, edx
sar eax, 5
mov eax, dword [esi + eax*4 + 0x22098]
mov dword [esi + ecx*4], eax
inc ecx
cmp ecx, dword [esi + 0x22088]
jl 0x1007fc7d
mov dword [esi + 0x22090], ebx
mov ebx, dword [ebp + 0x1c]
mov byte [esi + 0x22097], 1
cmp dword [ebx], 0
jg 0x1007fe21
push 4
pop edi
cmp byte [ebp + 0x18], 0
mov edx, dword [esi + 0x22090]
je 0x1007fd02
mov eax, dword [esi + 0x22088]
add eax, edx
jmp 0x1007fd04
cmp ebx, edi
jge 0x1007fcf1
mov dword [esi + edx*4 + 0x22098], ebx
pop edx
mov ecx, dword [esi + 0x22080]
mov eax, dword [ecx + edi*4]
mov dword [ecx + ebx*4], eax
inc ebx
inc edi
dec edx
test edx, edx
jg 0x1007fcd9
jmp 0x1007fc61
pop ecx
add ebx, ecx
mov dword [esi + edx*4 + 0x22098], edi
mov edi, ebx
jmp 0x1007fc64
mov eax, edx
cmp eax, 0x40000
jl 0x1007fd17
mov dword [ebx], 8
mov edx, dword [esi + 0x22090]
cmp byte [ebp + 0x18], 0
mov ebx, dword [esi + 0x22088]
push 2
pop ecx
cmove ecx, edi
add ebx, 8
imul ecx, edx
lea ebx, [ecx + ebx*2]
mov dword [ebp - 0xc], ebx
cmp ebx, dword [ebp + 0x10]
jle 0x1007fd3f
mov eax, ebx
jmp 0x1007fe23
cmp byte [ebp + 0x18], 0
mov ecx, dword [ebp + 0xc]
push 0x25
pop eax
lea edx, [ecx + 0x10]
mov dword [ecx], 0x54726965
mov dword [ecx + 4], eax
jne 0x1007fd5f
mov eax, 0x125
mov dword [ecx + 4], eax
cmp byte [esi + 0x22096], 0
je 0x1007fd70
or eax, 0x200
mov dword [ecx + 4], eax
cmp byte [ebp + 0x18], 0
mov edi, esi
mov eax, dword [esi + 0x22088]
mov dword [ecx + 8], eax
mov eax, dword [esi + 0x22090]
mov dword [ecx + 0xc], eax
mov ecx, dword [esi + 0x22088]
je 0x1007fde1
test ecx, ecx
jle 0x1007fdb2
push 4
pop ebx
mov eax, dword [esi + 0x22088]
add eax, dword [edi]
add edi, ebx
shr eax, 2
mov word [edx], ax
add edx, 2
dec ecx
test ecx, ecx
jg 0x1007fd97
mov ebx, dword [ebp - 0xc]
mov ecx, dword [esi + 0x22090]
mov edi, dword [esi + 0x22080]
test ecx, ecx
jle 0x1007fd38
push 4
pop ebx
mov ax, word [edi]
add edi, ebx
dec ecx
mov word [edx], ax
lea edx, [edx + 2]
test ecx, ecx
jg 0x1007fdc9
mov ebx, dword [ebp - 0xc]
jmp 0x1007fd38
test ecx, ecx
jle 0x1007fdfd
push 4
pop esi
mov eax, dword [edi]
add edi, esi
shr eax, 2
mov word [edx], ax
add edx, 2
dec ecx
test ecx, ecx
jg 0x1007fde8
mov esi, dword [ebp + 8]
mov ecx, dword [esi + 0x22090]
shl ecx, 2
push ecx
push dword [esi + 0x22080]
push edx
call fcn.100a8a30
add esp, 0xc
jmp 0x1007fd38
mov dword [ebx], 1
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret