Function at 0x790226
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
and dword [ebp - 0x18], 0
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, dword [ebp + 0x10]
test esi, esi
push edi
mov dword [ebp - 0xc], 1
mov dword [ebp - 0x10], ebx
jne 0x79024a
and dword [ebp - 0xc], esi
mov eax, dword [0xabbc88]
test eax, eax
jne 0x790262
mov eax, dword [0x8e7bc4]
shl eax, 2
push eax
call fcn.00799f6e
pop ecx
mov edi, eax
test edi, edi
mov dword [ebp - 0x24], eax
je 0x79028a
mov eax, dword [0xabbc8c]
test eax, eax
jne 0x790283
mov eax, dword [0x8e7bc0]
shl eax, 2
push eax
call fcn.00799f6e
pop ecx
test eax, eax
mov dword [ebp - 0x1c], eax
jne 0x790291
xor eax, eax
jmp 0x790662
mov ecx, dword [0x8e7bc4]
or eax, 0xffffffff
sub dword [ebp + 0xc], 4
rep stosd dword es:[edi], eax
js 0x7905af
mov ecx, dword [ebp + 0xc]
and dword [ebp - 0x14], 0
push 2
pop eax
mov dword [ebp - 8], eax
mov dword [ebp - 0x20], eax
mov eax, 0x404
cmp ecx, eax
mov dword [ebp - 0x34], ecx
jl 0x7902c5
mov dword [ebp - 0x34], eax
mov al, byte [ebx + 2]
movzx ecx, byte [ebx]
not al
movzx eax, al
shl ecx, 0x10
or eax, ecx
lea edi, [ebx + 1]
movzx ecx, byte [edi]
xor ecx, 0xaa
shl ecx, 8
xor eax, ecx
xor edx, edx
div dword [0x8e7bc4]
mov eax, dword [ebp - 0x24]
lea edx, [eax + edx*4]
mov ecx, dword [edx]
mov eax, ebx
sub eax, dword [0x8e7bc0]
mov dword [ebp - 0x30], edx
sub eax, dword [ebp + 8]
mov dword [ebp - 0x3c], ecx
inc eax
test eax, eax
mov dword [ebp - 0x28], ecx
jle 0x790314
mov dword [ebp - 0x2c], eax
jmp 0x790318
and dword [ebp - 0x2c], 0
mov eax, dword [ebp - 0x28]
cmp eax, dword [ebp - 0x2c]
jl 0x790587
mov ecx, dword [ebp - 0x28]
mov eax, dword [ebp + 8]
add eax, ecx
mov ecx, dword [ebp - 8]
mov dl, byte [ecx + ebx]
cmp dl, byte [eax + ecx]
mov dword [ebp - 4], eax
jne 0x7903ad
push dword [ebp - 0x34]
mov ecx, ebx
call fcn.00790202
cmp eax, dword [ebp - 8]
pop ecx
mov dword [ebp - 0x38], eax
jbe 0x7903ad
mov ecx, ebx
sub ecx, dword [ebp - 4]
dec ecx
cmp ecx, 0x400
jae 0x790369
cmp eax, 0xa
ja 0x790369
mov dword [ebp - 4], 2
jmp 0x790384
cmp ecx, 0x4000
jae 0x79037d
cmp eax, 0x43
mov dword [ebp - 4], 3
jbe 0x790384
mov dword [ebp - 4], 4
mov edx, dword [ebp - 8]
sub eax, dword [ebp - 4]
sub edx, dword [ebp - 0x20]
add eax, 4
add edx, 4
cmp eax, edx
jbe 0x7903ad
mov eax, dword [ebp - 0x38]
cmp eax, 0x404
mov edx, dword [ebp - 4]
mov dword [ebp - 8], eax
mov dword [ebp - 0x20], edx
mov dword [ebp - 0x14], ecx
jae 0x7903c8
mov eax, dword [0x8e7bc0]
mov ecx, dword [ebp - 0x1c]
dec eax
and eax, dword [ebp - 0x28]
mov eax, dword [ecx + eax*4]
cmp eax, dword [ebp - 0x2c]
mov dword [ebp - 0x28], eax
jge 0x790324
mov eax, dword [ebp - 0x20]
cmp eax, dword [ebp - 8]
jae 0x790584
cmp dword [ebp + 0xc], 4
jl 0x790584
mov edx, dword [ebp - 0x18]
jmp 0x79042d
mov eax, edx
and eax, 0xfffffffc
cmp eax, 0x70
jbe 0x7903f0
push 0x70
pop eax
sub edx, eax
cmp dword [ebp - 0xc], 0
mov dword [ebp - 0x18], edx
je 0x790427
mov ecx, eax
shr ecx, 2
sub cl, 0x21
mov byte [esi], cl
inc esi
mov dword [ebp - 4], esi
mov esi, dword [ebp - 0x10]
mov edi, dword [ebp - 4]
mov ecx, eax
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov edx, dword [ebp - 0x18]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [ebp - 4]
jmp 0x790428
inc esi
add dword [ebp - 0x10], eax
add esi, eax
cmp edx, 3
ja 0x7903e3
cmp dword [ebp - 0x20], 2
jne 0x79045f
cmp dword [ebp - 0xc], 0
je 0x79045b
mov eax, dword [ebp - 0x14]
mov cl, byte [ebp - 8]
shr eax, 3
sub cl, 3
and al, 0xe0
shl cl, 2
add al, cl
add al, dl
mov byte [esi], al
mov al, byte [ebp - 0x14]
inc esi
jmp 0x7904bd
inc esi
inc esi
jmp 0x7904c5
cmp dword [ebp - 0x20], 3
jne 0x790487
cmp dword [ebp - 0xc], 0
je 0x790482
mov al, byte [ebp - 8]
add al, 0x7c
mov byte [esi], al
mov eax, dword [ebp - 0x14]
mov cl, dl
shr eax, 8
shl cl, 6
inc esi
add al, cl
jmp 0x790453
add esi, 3
jmp 0x7904c5
cmp dword [ebp - 0xc], 0
je 0x7904c2
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0x14]
add eax, 0xfffffffb
shr eax, 6
and al, 0xfc
shr ecx, 0xc
and cl, 0xf0
add al, cl
add al, dl
sub al, 0x40
mov byte [esi], al
mov eax, dword [ebp - 0x14]
mov ecx, eax
inc esi
shr ecx, 8
mov byte [esi], cl
inc esi
mov byte [esi], al
mov al, byte [ebp - 8]
inc esi
sub al, 5
mov byte [esi], al
inc esi
jmp 0x7904c5
add esi, 4
test edx, edx
mov dword [ebp - 4], esi
je 0x7904f1
cmp dword [ebp - 0xc], 0
je 0x7904eb
mov esi, dword [ebp - 0x10]
mov edi, dword [ebp - 4]
mov ecx, edx
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [ebp - 4]
add esi, edx
and dword [ebp - 0x18], 0
cmp dword [ebp + 0x14], 0
je 0x79051a
mov ecx, dword [0x8e7bc0]
mov edx, dword [ebp - 0x30]
mov edx, dword [edx]
mov edi, dword [ebp - 0x1c]
mov eax, ebx
sub eax, dword [ebp + 8]
dec ecx
and ecx, eax
add ebx, dword [ebp - 8]
mov dword [edi + ecx*4], edx
mov ecx, dword [ebp - 0x30]
mov dword [ecx], eax
jmp 0x790579
cmp dword [ebp - 8], 0
jle 0x790579
mov eax, dword [ebp - 8]
mov ecx, ebx
sub ecx, dword [ebp + 8]
mov dword [ebp - 0x34], eax
mov al, byte [ebx + 2]
movzx edx, byte [ebx]
shl edx, 0x10
not al
movzx eax, al
or eax, edx
lea edi, [ebx + 1]
movzx edx, byte [edi]
xor edx, 0xaa
shl edx, 8
xor eax, edx
xor edx, edx
div dword [0x8e7bc4]
mov eax, dword [ebp - 0x24]
mov ebx, dword [ebp - 0x1c]
mov dword [ebp - 0x38], edi
lea eax, [eax + edx*4]
mov edx, dword [0x8e7bc0]
mov edi, dword [eax]
dec edx
and edx, ecx
mov dword [ebx + edx*4], edi
mov ebx, dword [ebp - 0x38]
mov dword [eax], ecx
inc ecx
dec dword [ebp - 0x34]
jne 0x79052b
mov eax, dword [ebp - 8]
sub dword [ebp + 0xc], eax
mov dword [ebp - 0x10], ebx
jmp 0x7905a5
mov ecx, dword [ebp - 0x3c]
sub ebx, dword [ebp + 8]
mov eax, dword [0x8e7bc0]
mov edx, dword [ebp - 0x1c]
dec eax
and eax, ebx
inc dword [ebp - 0x18]
dec dword [ebp + 0xc]
mov dword [edx + eax*4], ecx
mov eax, dword [ebp - 0x30]
mov dword [eax], ebx
mov ebx, edi
cmp dword [ebp + 0xc], 0
jge 0x7902a6
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp + 0xc]
lea edx, [eax + ecx + 4]
jmp 0x7905ff
mov eax, edx
and eax, 0xfffffffc
cmp eax, 0x70
jbe 0x7905c8
push 0x70
pop eax
sub edx, eax
cmp dword [ebp - 0xc], 0
je 0x7905f9
mov ecx, eax
shr ecx, 2
sub cl, 0x21
mov byte [esi], cl
inc esi
mov dword [ebp - 4], esi
mov esi, dword [ebp - 0x10]
mov edi, dword [ebp - 4]
mov ecx, eax
mov ebx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [ebp - 4]
jmp 0x7905fa
inc esi
add dword [ebp - 0x10], eax
add esi, eax
cmp edx, 3
ja 0x7905bb
cmp dword [ebp - 0xc], 0
je 0x790610
mov al, dl
sub al, 4
mov byte [esi], al
inc esi
test edx, edx
mov dword [ebp - 4], esi
je 0x790639
cmp dword [ebp - 0xc], 0
je 0x790637
mov esi, dword [ebp - 0x10]
mov edi, dword [ebp - 4]
mov ecx, edx
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [ebp - 4]
add esi, edx
cmp dword [0xabbc88], 0
jne 0x79064b
push dword [ebp - 0x24]
call fcn.0079a005
pop ecx
cmp dword [0xabbc8c], 0
jne 0x79065d
push dword [ebp - 0x1c]
call fcn.0079a005
pop ecx
mov eax, esi
sub eax, dword [ebp + 0x10]
pop edi
pop esi
pop ebx
leave
ret