Function at 0x10022a80
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
mov esi, ecx
push edi
mov edi, dword [esi]
test edi, edi
je 0x10022aaa
push 4
push edi
call dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
test eax, eax
jne 0x10022aaa
mov ecx, edi
call dword [0x10041b34]
mov edi, eax
jmp 0x10022aac
xor edi, edi
mov ebx, dword [esi]
test ebx, ebx
je 0x10022acb
push 4
push ebx
call dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
test eax, eax
jne 0x10022acb
or edi, 0x20
mov ecx, ebx
push edi
call dword [0x10041b38]
mov byte [ebp - 0x14], 0x67
mov al, 5
xor al, byte [ebp - 0x14]
mov dl, 9
mov byte [ebp - 0x13], al
mov dh, 8
mov al, byte [ebp - 0x14]
mov cl, 0x13
xor dl, al
mov byte [ebp - 0xa], 0
xor dh, al
mov byte [ebp - 0x11], dl
mov byte [ebp - 0xd], dh
xor cl, al
mov bl, 0x38
mov byte [ebp - 1], 2
xor bl, al
mov byte [ebp - 0x12], cl
mov ah, 4
mov byte [ebp - 0x10], bl
xor ah, al
mov byte [ebp - 0xa], 0
mov ch, 0xb
mov byte [ebp - 0xf], ah
xor ch, al
mov bh, 0x14
xor bh, al
mov byte [ebp - 0xe], ch
mov al, byte [ebp - 1]
sub esp, 0x18
xor al, byte [ebp - 0x14]
mov edx, esp
mov byte [ebp - 0xc], bh
mov byte [ebp - 0xb], al
mov dword [edx + 0x10], 0
mov dword [edx + 0x14], 0
mov dword [edx + 0x14], 0xf
cmp dword [edx + 0x14], 0x10
mov dword [edx + 0x10], 0
jb 0x10022b4b
mov eax, dword [edx]
jmp 0x10022b4d
mov eax, edx
mov byte [eax], 0
cmp byte [ebp - 0x13], 0
jne 0x10022b5a
xor ecx, ecx
jmp 0x10022b69
lea ecx, [ebp - 0x13]
lea edi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10022b60
sub ecx, edi
push ecx
lea eax, [ebp - 0x13]
mov ecx, edx
push eax
call fcn.10004e40
mov ecx, dword [esi]
call fcn.1000db70
add esp, 0x18
mov dword [esi + 4], eax
mov cl, 0x6e
mov dword [ebp - 0x18], 0x1a0c6e
mov dword [ebp - 0x14], 0x1c0f1931
xor eax, eax
mov dword [ebp - 0x10], 0x1c01071c
mov byte [ebp - 0xc], 0
nop
xor byte [ebp + eax - 0x17], cl
inc eax
cmp eax, 0xb
jae 0x10022baf
mov cl, byte [ebp - 0x18]
jmp 0x10022ba0
sub esp, 0x18
mov byte [ebp - 0xc], 0
mov edx, esp
mov dword [edx + 0x10], 0
mov dword [edx + 0x14], 0
mov dword [edx + 0x14], 0xf
cmp dword [edx + 0x14], 0x10
mov dword [edx + 0x10], 0
jb 0x10022bde
mov eax, dword [edx]
jmp 0x10022be0
mov eax, edx
mov byte [eax], 0
cmp byte [ebp - 0x17], 0
jne 0x10022bed
xor ecx, ecx
jmp 0x10022bfc
lea ecx, [ebp - 0x17]
lea edi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10022bf3
sub ecx, edi
push ecx
lea eax, [ebp - 0x17]
mov ecx, edx
push eax
call fcn.10004e40
mov ecx, dword [esi]
call fcn.1000db70
mov dword [esi + 8], eax
mov dl, 0x3b
mov byte [ebp - 0x14], 0x55
mov al, 0x37
xor al, byte [ebp - 0x14]
mov dh, 0x32
mov byte [ebp - 0x13], al
mov cl, 0x21
mov al, byte [ebp - 0x14]
mov bl, 0xa
xor dl, al
mov byte [ebp - 0xa], 0
xor dh, al
mov byte [ebp - 0x11], dl
mov byte [ebp - 0xd], dh
xor cl, al
xor bl, al
mov byte [ebp - 1], 0x30
mov edx, esp
mov byte [ebp - 0x12], cl
mov ah, 0x27
mov byte [ebp - 0x10], bl
xor ah, al
mov byte [ebp - 0xa], 0
mov ch, 0x3a
mov byte [ebp - 0xf], ah
xor ch, al
mov bh, 0x20
xor bh, al
mov byte [ebp - 0xe], ch
mov al, byte [ebp - 1]
xor al, byte [ebp - 0x14]
mov byte [ebp - 0xc], bh
mov byte [ebp - 0xb], al
mov dword [edx + 0x10], 0
mov dword [edx + 0x14], 0
mov dword [edx + 0x14], 0xf
cmp dword [edx + 0x14], 0x10
mov dword [edx + 0x10], 0
jb 0x10022c8f
mov eax, dword [edx]
jmp 0x10022c91
mov eax, edx
mov byte [eax], 0
cmp byte [ebp - 0x13], 0
jne 0x10022c9e
xor ecx, ecx
jmp 0x10022cad
lea ecx, [ebp - 0x13]
lea edi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10022ca4
sub ecx, edi
push ecx
lea eax, [ebp - 0x13]
mov ecx, edx
push eax
call fcn.10004e40
mov ecx, dword [esi]
call fcn.1000db70
mov dword [esi + 0xc], eax
mov dl, 0x5a
mov byte [ebp - 0x14], 0x34
mov al, 0x56
xor al, byte [ebp - 0x14]
mov dh, 0x53
mov byte [ebp - 0x13], al
mov cl, 0x40
mov al, byte [ebp - 0x14]
mov bl, 0x6b
xor dl, al
mov byte [ebp - 0xb], 0
mov byte [ebp - 0x11], dl
xor dh, al
mov byte [ebp - 0xd], dh
mov ah, 0x59
mov edx, esp
mov byte [ebp - 0xb], 0
mov ch, 0x55
mov bh, 0x51
xor cl, al
xor bl, al
mov byte [ebp - 0x12], cl
xor ah, al
mov byte [ebp - 0x10], bl
xor ch, al
mov byte [ebp - 0xf], ah
xor bh, al
mov byte [ebp - 0xe], ch
mov byte [ebp - 0xc], bh
mov dword [edx + 0x10], 0
mov dword [edx + 0x14], 0
mov dword [edx + 0x14], 0xf
cmp dword [edx + 0x14], 0x10
mov dword [edx + 0x10], 0
jb 0x10022d33
mov eax, dword [edx]
jmp 0x10022d35
mov eax, edx
mov byte [eax], 0
cmp byte [ebp - 0x13], 0
jne 0x10022d42
xor ecx, ecx
jmp 0x10022d51
lea ecx, [ebp - 0x13]
lea edi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10022d48
sub ecx, edi
push ecx
lea eax, [ebp - 0x13]
mov ecx, edx
push eax
call fcn.10004e40
mov ecx, dword [esi]
call fcn.1000db70
mov dword [esi + 0x10], eax
mov cl, 0x71
mov byte [ebp - 0x14], 5
mov al, 0x67
xor al, byte [ebp - 0x14]
mov dl, 0x6b
mov byte [ebp - 0x13], al
mov dh, 0x6c
mov byte [ebp - 2], cl
mov bl, 0x5a
xor cl, byte [ebp - 0x14]
mov ah, 0x75
mov byte [ebp - 0x12], cl
mov ch, 0x77
mov cl, byte [ebp - 0x14]
mov bh, 0x60
mov byte [ebp - 1], 0x76
xor dl, cl
mov al, byte [ebp - 1]
xor dh, cl
mov byte [ebp - 0x11], dl
xor al, cl
mov byte [ebp - 0xb], al
xor bl, cl
mov al, byte [ebp - 2]
xor ah, cl
mov byte [ebp - 0xd], dh
xor ch, cl
mov edx, esp
mov byte [ebp - 9], 0
mov byte [ebp - 0x10], bl
xor bh, cl
mov byte [ebp - 0xf], ah
xor al, cl
mov byte [ebp - 0xe], ch
mov byte [ebp - 0xc], bh
mov byte [ebp - 0xa], al
mov byte [ebp - 9], 0
mov dword [edx + 0x10], 0
mov dword [edx + 0x14], 0
mov dword [edx + 0x14], 0xf
cmp dword [edx + 0x14], 0x10
mov dword [edx + 0x10], 0
jb 0x10022def
mov eax, dword [edx]
jmp 0x10022df1
mov eax, edx
mov byte [eax], 0
cmp byte [ebp - 0x13], 0
jne 0x10022dfe
xor ecx, ecx
jmp 0x10022e0d
lea ecx, [ebp - 0x13]
lea edi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10022e04
sub ecx, edi
push ecx
lea eax, [ebp - 0x13]
mov ecx, edx
push eax
call fcn.10004e40
mov ecx, dword [esi]
call fcn.1000db70
movaps xmm0, xmmword [0x10042330]
add esp, 0x18
mov dword [esi + 0x14], eax
xor ecx, ecx
movups xmmword [ebp - 0x1c], xmm0
mov dword [ebp - 0xc], 0x3c3430
nop word [eax + eax]
mov al, byte [ebp - 0x1c]
xor byte [ebp + ecx - 0x1b], al
inc ecx
cmp ecx, 0x12
jb 0x10022e40
sub esp, 0x18
mov byte [ebp - 9], 0
mov edx, esp
mov dword [edx + 0x10], 0
mov dword [edx + 0x14], 0
mov dword [edx + 0x14], 0xf
cmp dword [edx + 0x14], 0x10
mov dword [edx + 0x10], 0
jb 0x10022e7c
mov eax, dword [edx]
jmp 0x10022e7e
mov eax, edx
mov byte [eax], 0
cmp byte [ebp - 0x1b], 0
jne 0x10022e8b
xor ecx, ecx
jmp 0x10022e9a
lea ecx, [ebp - 0x1b]
lea edi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10022e91
sub ecx, edi
push ecx
lea eax, [ebp - 0x1b]
mov ecx, edx
push eax
call fcn.10004e40
mov ecx, dword [esi]
call fcn.1000db70
movaps xmm0, xmmword [str.K_3_]
add esp, 0x18
mov dword [esi + 0x18], eax
xor ecx, ecx
movups xmmword [ebp - 0x20], xmm0
mov dword [ebp - 0x10], 0x253e2428
mov word [ebp - 0xc], 0x3f
nop dword [eax]
mov al, byte [ebp - 0x20]
xor byte [ebp + ecx - 0x1f], al
inc ecx
cmp ecx, 0x14
jb 0x10022ed0
sub esp, 0x18
mov byte [ebp - 0xb], 0
mov edx, esp
mov dword [edx + 0x10], 0
mov dword [edx + 0x14], 0
mov dword [edx + 0x14], 0xf
cmp dword [edx + 0x14], 0x10
mov dword [edx + 0x10], 0
jb 0x10022f0c
mov eax, dword [edx]
jmp 0x10022f0e
mov eax, edx
mov byte [eax], 0
cmp byte [ebp - 0x1f], 0
jne 0x10022f1b
xor ecx, ecx
jmp 0x10022f2a
lea ecx, [ebp - 0x1f]
lea edi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10022f21
sub ecx, edi
push ecx
lea eax, [ebp - 0x1f]
mov ecx, edx
push eax
call fcn.10004e40
mov ecx, dword [esi]
call fcn.1000db70
movaps xmm0, xmmword [0x10042680]
add esp, 0x18
mov dword [esi + 0x1c], eax
xor ecx, ecx
movups xmmword [ebp - 0x20], xmm0
mov dword [ebp - 0x10], 0x565a6655
mov dword [ebp - 0xc], 0x4d574c
nop
mov al, byte [ebp - 0x20]
xor byte [ebp + ecx - 0x1f], al
inc ecx
cmp ecx, 0x16
jb 0x10022f60
sub esp, 0x18
mov byte [ebp - 9], 0
mov edx, esp
mov dword [edx + 0x14], 0xf
mov dword [edx + 0x10], 0
mov byte [edx], 0
cmp byte [ebp - 0x1f], 0
jne 0x10022f91
xor ecx, ecx
jmp 0x10022fa0
lea ecx, [ebp - 0x1f]
lea edi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10022f97
sub ecx, edi
push ecx
lea eax, [ebp - 0x1f]
mov ecx, edx
push eax
call fcn.10004e40
mov ecx, dword [esi]
call fcn.1000db70
add esp, 0x18
mov dword [esi + 0x20], eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret