Function at 0x100224e0
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x11c
mov eax, dword [0x10048200]
xor eax, esp
mov dword [esp + 0x118], eax
cmp dword [esp + 0x130], 0
mov eax, dword [esp + 0x134]
mov ecx, dword [esp + 0x124]
mov edx, dword [esp + 0x12c]
mov dword [esp], eax
mov eax, dword [esp + 0x138]
push esi
mov dword [esp + 0xc], ecx
lea esi, [esp + 0x18]
mov dword [esp + 8], edx
mov dword [esp + 0x14], eax
je 0x1002276a
test edx, edx
je 0x1002276a
movzx eax, word [ecx + 0x28]
mov edx, 0xff
push ebx
push ebp
push edi
cmp ax, dx
je case.0x10022611.9
lea edx, [esp + 0x1c]
push edx
push eax
push dword [ecx + 0x10]
call fcn.100245c0
test eax, eax
js 0x10022745
mov eax, dword [esp + 0x1c]
xor ebp, ebp
mov edi, dword [esp + 0x138]
movzx ecx, byte [eax + 1]
lea ebx, [eax + 0x18]
test ecx, ecx
je 0x10022591
mov edx, edi
lea eax, [ebx + 2]
shr edx, 0x10
cmp dl, byte [eax]
je 0x10022591
inc ebp
add eax, 8
cmp ebp, ecx
jb 0x10022585
cmp ebp, ecx
jae case.0x10022611.9
push 0x100
lea eax, [esp + 0x28]
push eax
mov eax, dword [esp + 0x20]
push dword [eax + 0x18]
call fcn.1000f8d0
mov dword [esp + 0x18], eax
test ebp, ebp
je 0x100225e9
mov edi, ebp
lea esp, [esp]
lea eax, [esp + 0x124]
push eax
push ebx
push esi
call fcn.1002b930
add esi, eax
add ebx, 8
dec edi
jne 0x100225c0
mov edi, dword [esp + 0x138]
lea eax, [esp + 0x11e]
cmp esi, eax
jae 0x100225fb
mov al, byte [esi]
test al, al
je 0x1002272c
cmp al, 0xff
je 0x1002272c
mov eax, dword [esp + 0x1c]
shr edi, 0x18
movzx eax, byte [eax + ebp*8 + 0x1c]
dec eax
cmp eax, 9
ja case.0x10022611.9
jmp dword [eax*4 + 0x1002278c]
lea eax, [esi + 1]
lea ecx, [esp + 0x124]
cmp eax, ecx
jae case.0x10022611.2
xor byte [eax], 0x80
lea eax, [esi + 1]
lea ecx, [esp + 0x124]
cmp eax, ecx
jae case.0x10022611.9
cmp dword [esp + 0x140], 1
jb case.0x10022611.9
mov al, byte [eax]
xor al, byte [esi]
mov ecx, dword [esp + 0x14]
xor al, 0x7f
mov byte [ecx], al
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x20]
mov dword [eax], 1
mov eax, 1
mov dword [ecx], eax
xor eax, eax
jmp 0x10022745
mov dl, byte [esi]
xor dl, 0x7f
xor byte [esi + 1], 0x80
jmp 0x10022696
mov dl, byte [esi + 1]
mov al, byte [esi]
and dl, 0x80
neg dl
not al
sbb dl, dl
and dl, 1
dec dl
xor al, dl
and al, 0x80
xor byte [esi + 1], al
mov eax, edi
lea ecx, [esp + 0x24]
sub eax, ecx
inc eax
add eax, esi
cmp eax, 0xfa
jae case.0x10022611.9
cmp dword [esp + 0x140], edi
jb case.0x10022611.9
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
add ecx, edi
mov dword [eax], edi
test edi, edi
je 0x100226e0
lea esp, [esp]
mov al, byte [esi + 1]
lea esi, [esi + 1]
xor al, dl
lea ecx, [ecx - 1]
mov byte [ecx], al
dec edi
jne 0x100226d0
mov ecx, dword [esp + 0x20]
mov eax, 1
mov dword [ecx], eax
xor eax, eax
jmp 0x10022745
cmp dword [esp + 0x18], 0xff
jae case.0x10022611.9
mov ax, word [ebx + 6]
mov ecx, dword [esp + 0x140]
shr ax, 0xf
movzx eax, ax
push eax
movzx eax, byte [ebx + 5]
push eax
mov eax, dword [esp + 0x18]
push eax
push ecx
mov ecx, dword [esp + 0x24]
push esi
push ecx
call fcn.1002f6a0
mov ecx, dword [esp + 0x20]
mov dword [ecx], eax
xor eax, eax
jmp 0x10022745
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x20]
mov dword [eax], 0
mov eax, 0x3ec
mov dword [ecx], 1
pop edi
pop ebp
pop ebx
pop esi
mov ecx, dword [esp + 0x118]
xor ecx, esp
call fcn.1003d130
add esp, 0x11c
ret 0x1c
mov ecx, dword [esp + 0x20]
xor eax, eax
mov dword [ecx], eax
jmp 0x10022745
mov ecx, dword [esp + 0x11c]
pop esi
mov dword [eax], 0
xor ecx, esp
xor eax, eax
call fcn.1003d130
add esp, 0x11c
ret 0x1c