Function at 0x1022810
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x184c
call fcn.0115cb30
mov dword [ebp - 8], 0x40
cmp dword [0x13949ec], 0
jne 0x102301a
mov dword [ebp - 0x4c], 0
jmp 0x1022843
mov eax, dword [ebp - 0x4c]
add eax, 1
mov dword [ebp - 0x4c], eax
cmp dword [ebp - 0x4c], 2
jge 0x1023010
mov dword [ebp - 0x106c], 0x1018
mov dword [ebp - 0x107c], 0xc
mov ecx, dword [0x145685c]
mov dword [ebp - 0x1078], ecx
mov edx, dword [0x1456860]
mov dword [ebp - 0x1074], edx
mov eax, dword [ebp - 0x4c]
mov ecx, dword [eax*4 + 0x145686c]
mov dword [ebp - 0x1070], ecx
mov byte [ebp - 0x1088], 0
mov byte [ebp - 0x1087], 0
mov edx, dword [0x13949e8]
mov dword [ebp - 0x13a0], edx
lea eax, [ebp - 0x139c]
push eax
mov ecx, dword [ebp - 0x13a0]
push ecx
call fcn.0108a2d0
add esp, 8
mov dword [ebp - 0x1398], eax
cmp dword [ebp - 0x1398], 0
jne 0x1022cfe
mov byte [ebp - 0x1088], 0
lea edx, [ebp - 0x1394]
push edx
lea eax, [ebp - 0x139c]
push eax
mov ecx, dword [ebp - 0x13a0]
push ecx
call fcn.0108a350
add esp, 0xc
mov dword [ebp - 0x1398], eax
cmp dword [ebp - 0x1398], 0
jne 0x1022af3
mov dword [ebp - 0x13a4], 0
jmp 0x102291e
mov edx, dword [ebp - 0x13a4]
add edx, 1
mov dword [ebp - 0x13a4], edx
cmp dword [ebp - 0x13a4], 8
jge 0x10229a1
mov byte [ebp - 0x13a5], 0
mov dword [ebp - 0x13ac], 0
jmp 0x1022949
mov eax, dword [ebp - 0x13ac]
add eax, 1
mov dword [ebp - 0x13ac], eax
cmp dword [ebp - 0x13ac], 8
jge 0x1022981
lea ecx, [ebp - 0x13b8]
push ecx
call dword [0x1557682]
movzx edx, byte [ebp - 0x13a5]
mov eax, dword [ebp - 0x13b8]
and eax, 1
mov ecx, dword [ebp - 0x13ac]
shl eax, cl
or edx, eax
mov byte [ebp - 0x13a5], dl
jmp 0x102293a
xor ecx, ecx
jne 0x1022927
xor edx, edx
jne 0x1022927
mov eax, dword [ebp - 0x13a4]
mov cl, byte [ebp - 0x13a5]
mov byte [ebp + eax - 0x128c], cl
jmp 0x102290f
xor edx, edx
jne 0x1022903
mov eax, fcn.01022080
test eax, eax
je 0x1022a29
push 8
call fcn.0115cedd
add esp, 4
mov dword [ebp - 0x1834], eax
mov ecx, dword [ebp - 0x1834]
mov dword [ebp - 0x13bc], ecx
cmp dword [ebp - 0x13bc], 0
je 0x1022a29
mov dword [ebp - 0x13c0], 8
lea edx, [ebp - 0x13c0]
push edx
mov eax, dword [ebp - 0x13bc]
push eax
push 8
lea ecx, [ebp - 0x1390]
push ecx
push 1
call fcn.01022080
add esp, 0x14
mov dword [ebp - 0x13c4], eax
cmp dword [ebp - 0x13c4], 0
jne 0x1022a29
push 8
mov edx, dword [ebp - 0x13bc]
push edx
lea eax, [ebp - 0x1390]
push eax
call fcn.0115b060
add esp, 0xc
xor ecx, ecx
jne 0x10229a9
mov edx, fcn.01022080
test edx, edx
je 0x1022ab1
push 8
call fcn.0115cedd
add esp, 4
mov dword [ebp - 0x1838], eax
mov eax, dword [ebp - 0x1838]
mov dword [ebp - 0x13c8], eax
cmp dword [ebp - 0x13c8], 0
je 0x1022ab1
mov dword [ebp - 0x13cc], 8
lea ecx, [ebp - 0x13cc]
push ecx
mov edx, dword [ebp - 0x13c8]
push edx
push 8
lea eax, [ebp - 0x128c]
push eax
push 1
call fcn.01022080
add esp, 0x14
mov dword [ebp - 0x13d0], eax
cmp dword [ebp - 0x13d0], 0
jne 0x1022ab1
push 8
mov ecx, dword [ebp - 0x13c8]
push ecx
lea edx, [ebp - 0x128c]
push edx
call fcn.0115b060
add esp, 0xc
xor eax, eax
jne 0x1022a31
lea ecx, [ebp - 0x1290]
push ecx
lea edx, [ebp - 0x1394]
push edx
lea eax, [ebp - 0x139c]
push eax
mov ecx, dword [ebp - 0x13a0]
push ecx
call fcn.0108a3a0
add esp, 0x10
mov dword [ebp - 0x1398], eax
cmp dword [ebp - 0x1398], 0
jne 0x1022af3
mov byte [ebp - 0x1088], 1
xor edx, edx
jne 0x10228cc
mov byte [ebp - 0x1087], 0
mov dword [ebp - 0x13d4], 0
jmp 0x1022b1d
mov eax, dword [ebp - 0x13d4]
add eax, 1
mov dword [ebp - 0x13d4], eax
cmp dword [ebp - 0x13d4], 8
jge 0x1022ba0
mov byte [ebp - 0x13d5], 0
mov dword [ebp - 0x13dc], 0
jmp 0x1022b48
mov ecx, dword [ebp - 0x13dc]
add ecx, 1
mov dword [ebp - 0x13dc], ecx
cmp dword [ebp - 0x13dc], 8
jge 0x1022b80
lea edx, [ebp - 0x13e8]
push edx
call dword [0x1557682]
movzx eax, byte [ebp - 0x13d5]
mov edx, dword [ebp - 0x13e8]
and edx, 1
mov ecx, dword [ebp - 0x13dc]
shl edx, cl
or eax, edx
mov byte [ebp - 0x13d5], al
jmp 0x1022b39
xor eax, eax
jne 0x1022b26
xor ecx, ecx
jne 0x1022b26
mov edx, dword [ebp - 0x13d4]
mov al, byte [ebp - 0x13d5]
mov byte [ebp + edx - 0x1390], al
jmp 0x1022b0e
xor ecx, ecx
jne 0x1022b02
mov dword [ebp - 0x1394], 8
lea edx, [ebp - 0x1394]
push edx
lea eax, [ebp - 0x139c]
push eax
mov ecx, dword [ebp - 0x13a0]
push ecx
call fcn.0108a430
add esp, 0xc
mov dword [ebp - 0x1398], eax
cmp dword [ebp - 0x1398], 0
jne 0x1022cc4
lea edx, [ebp - 0x118c]
push edx
lea eax, [ebp - 0x14f0]
push eax
lea ecx, [ebp - 0x139c]
push ecx
mov edx, dword [ebp - 0x13a0]
push edx
call fcn.0108a480
add esp, 0x10
mov dword [ebp - 0x1398], eax
cmp dword [ebp - 0x1398], 0
jne 0x1022cc4
mov eax, fcn.01022080
test eax, eax
je 0x1022c99
push 8
call fcn.0115cedd
add esp, 4
mov dword [ebp - 0x183c], eax
mov ecx, dword [ebp - 0x183c]
mov dword [ebp - 0x14f4], ecx
cmp dword [ebp - 0x14f4], 0
je 0x1022c99
mov dword [ebp - 0x14f8], 8
lea edx, [ebp - 0x14f8]
push edx
mov eax, dword [ebp - 0x14f4]
push eax
push 8
lea ecx, [ebp - 0x14ec]
push ecx
push 2
call fcn.01022080
add esp, 0x14
mov dword [ebp - 0x14fc], eax
cmp dword [ebp - 0x14fc], 0
jne 0x1022c99
push 8
mov edx, dword [ebp - 0x14f4]
push edx
lea eax, [ebp - 0x14ec]
push eax
call fcn.0115b060
add esp, 0xc
xor ecx, ecx
jne 0x1022c19
push 8
lea edx, [ebp - 0x1390]
push edx
lea eax, [ebp - 0x14ec]
push eax
call fcn.0115c5b0
add esp, 0xc
test eax, eax
jne 0x1022cc4
mov byte [ebp - 0x1087], 1
xor ecx, ecx
jne 0x1022afb
movzx edx, byte [ebp - 0x1088]
test edx, edx
je 0x1022cfe
movzx eax, byte [ebp - 0x1087]
test eax, eax
je 0x1022cfe
lea ecx, [ebp - 0x139c]
push ecx
mov edx, dword [ebp - 0x13a0]
push edx
call fcn.0108a500
add esp, 8
mov dword [ebp - 0x1398], eax
xor eax, eax
jne 0x1022889
movzx ecx, byte [ebp - 0x1088]
test ecx, ecx
je 0x1022d1c
movzx edx, byte [ebp - 0x1087]
test edx, edx
jne 0x1022d23
mov dword [ebp - 4], 0x4b630fe3
mov dword [ebp - 0x1724], 8
lea eax, [ebp - 0x1724]
push eax
lea ecx, [ebp - 0x182c]
push ecx
push 8
lea edx, [ebp - 0x1188]
push edx
push 2
call fcn.01022080
add esp, 0x14
mov dword [ebp - 0x1724], 8
lea eax, [ebp - 0x1724]
push eax
lea ecx, [ebp - 0x171c]
push ecx
push 8
lea edx, [ebp - 0x128c]
push edx
push 2
call fcn.01022080
add esp, 0x14
mov eax, dword [ebp - 0x182c]
xor eax, dword [ebp - 0x171c]
mov dword [ebp - 0x1604], eax
mov ecx, dword [ebp - 0x1828]
xor ecx, dword [ebp - 0x1718]
mov dword [ebp - 0x1600], ecx
xor edx, edx
jne 0x1022d79
push 0x104
push 0
lea eax, [ebp - 0x1830]
push eax
call fcn.0115ae00
add esp, 0xc
push 0x104
push 0
lea ecx, [ebp - 0x1720]
push ecx
call fcn.0115ae00
add esp, 0xc
xor edx, edx
jne 0x1022d23
mov dword [ebp - 0x160c], 0x1b
mov eax, dword [ebp - 0x160c]
push eax
call fcn.0115cedd
add esp, 4
mov dword [ebp - 0x1840], eax
mov ecx, dword [ebp - 0x1840]
mov dword [ebp - 0x1500], ecx
mov edx, dword [ebp - 0x106c]
add edx, 0xb
mov dword [ebp - 0x1614], edx
mov eax, dword [ebp - 0x1614]
push eax
call fcn.0115cedd
add esp, 4
mov dword [ebp - 0x1844], eax
mov ecx, dword [ebp - 0x1844]
mov dword [ebp - 0x1610], ecx
lea edx, [ebp - 0x160c]
push edx
mov eax, dword [ebp - 0x1500]
push eax
push 0x10
lea ecx, [ebp - 0x107c]
push ecx
push 8
lea edx, [ebp - 0x1604]
push edx
push 1
call fcn.0108a570
add esp, 0x1c
lea eax, [ebp - 0x1614]
push eax
mov ecx, dword [ebp - 0x1610]
push ecx
mov edx, dword [ebp - 0x160c]
push edx
mov eax, dword [ebp - 0x1500]
push eax
lea ecx, [ebp - 0x139c]
push ecx
mov edx, dword [ebp - 0x13a0]
push edx
call fcn.0108a540
add esp, 0x18
mov dword [ebp - 0x1398], eax
lea eax, [ebp - 0x1068]
test eax, eax
je 0x1022ed1
lea ecx, [ebp - 0x106c]
push ecx
lea edx, [ebp - 0x1068]
push edx
mov eax, dword [ebp - 0x1614]
push eax
mov ecx, dword [ebp - 0x1610]
push ecx
push 8
lea edx, [ebp - 0x1604]
push edx
push 2
call fcn.0108a570
add esp, 0x1c
mov dword [ebp - 0x1398], eax
mov eax, dword [ebp - 0x1500]
mov dword [ebp - 0x1848], eax
mov ecx, dword [ebp - 0x1848]
push ecx
call fcn.0115ced8
add esp, 4
mov edx, dword [ebp - 0x1610]
mov dword [ebp - 0x184c], edx
mov eax, dword [ebp - 0x184c]
push eax
call fcn.0115ced8
add esp, 4
xor ecx, ecx
jne 0x1022d23
cmp dword [ebp - 0x1398], 0
je 0x1022f1f
mov dword [ebp - 4], 0x6ddb58ec
lea edx, [ebp - 0x139c]
push edx
mov eax, dword [ebp - 0x13a0]
push eax
call fcn.0108a310
add esp, 8
mov dword [ebp - 0x1398], eax
push 0x31c
push 0
lea ecx, [ebp - 0x13a0]
push ecx
call fcn.0115ae00
add esp, 0xc
xor edx, edx
jne 0x1022f1f
mov dword [ebp - 4], 0xb502cbf7
xor eax, eax
jne 0x1022889
cmp dword [ebp - 4], 0xb502cbf7
jne 0x1022fb6
mov ecx, dword [ebp - 8]
cmp ecx, dword [ebp - 0x1064]
jae 0x1022f8a
mov edx, dword [ebp - 0x1064]
mov dword [ebp - 8], edx
mov dword [ebp - 4], 0xb5bc4130
jmp 0x1022fb6
mov eax, dword [ebp - 0x1068]
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 0x1064]
push ecx
lea edx, [ebp - 0x1060]
push edx
lea eax, [ebp - 0x48]
push eax
call fcn.0115b060
add esp, 0xc
mov ecx, dword [ebp - 0x1064]
mov dword [ebp - 8], ecx
xor edx, edx
jne 0x102284d
cmp dword [ebp - 4], 0xb502cbf7
je 0x1022fcc
mov eax, dword [ebp - 4]
jmp 0x102301f
lea eax, [ebp - 0x48]
push eax
mov ecx, dword [ebp - 0x4c]
imul ecx, ecx, 0x204
add ecx, 0x13946d0
push ecx
call fcn.0115b460
add esp, 8
mov edx, dword [ebp - 0x4c]
mov eax, dword [edx*4 + 0x1456864]
push eax
mov ecx, dword [ebp - 0x4c]
imul ecx, ecx, 0x204
add ecx, 0x13945d0
push ecx
call fcn.0115b460
add esp, 8
jmp 0x102283a
mov dword [0x13949ec], 1
mov eax, 0xb502cbf7
mov esp, ebp
pop ebp
ret