Function at 0x422850
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x40
mov dword [esp + 0x14], 0
mov dword [esp + 0x18], 0x92919097
mov dword [esp + 0x1c], 0
mov dword [esp + 0x20], 0
mov byte [esp + 0x24], 0
mov dword [esp], 0
mov eax, dword [esp]
cmp eax, 0xc
ja 0x4228d1
mov eax, dword [esp]
mov ecx, dword [esp]
movzx ecx, byte [esp + ecx + 0x18]
lea edx, [eax + 0x25b61a43]
lea esi, [eax + 0x43]
or edx, esi
and esi, ecx
and edx, ecx
add edx, esi
add eax, ecx
add eax, 0x25b61a43
sub eax, edx
mov dword [esp + 4], eax
mov eax, dword [esp + 4]
add al, 0x2b
mov ecx, dword [esp]
mov byte [esp + ecx + 0x18], al
inc dword [esp]
mov eax, dword [esp]
cmp eax, 0xd
jb 0x422890
mov eax, dword [esp + 0x18]
mov ecx, dword [0x44d2ec]
test ecx, ecx
je 0x422924
xor edx, edx
mov esi, dword [0x44d2f0]
nop
nop
nop
nop
nop
nop
nop
nop
nop
cmp dword [esi + edx*8], 0xe4aa2089
je 0x422900
inc edx
cmp ecx, edx
jne 0x4228f0
jmp 0x422924
mov ecx, dword [esi + edx*8 + 4]
cmp ecx, eax
je 0x422924
lea eax, [esp + 0x14]
push eax
push 0
push 0
push 5
push 4
push dword [0x44d2f4]
push ecx
call fcn.0043ab60
add esp, 0x1c
cmp eax, 0xc0000004
jne 0x4229e0
push dword [esp + 0x14]
call fcn.00438a50
add esp, 4
mov dword [esp + 8], eax
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x18], 0x92919097
mov dword [esp + 0x1c], 0
mov dword [esp + 0x20], 0
mov byte [esp + 0x24], 0
mov dword [esp], 0
mov eax, dword [esp]
cmp eax, 0xc
ja 0x4229b1
nop
mov eax, dword [esp]
mov edx, dword [esp]
movzx edx, byte [esp + edx + 0x18]
lea esi, [eax + 0x25b61a43]
lea edi, [eax + 0x43]
or esi, edi
and edi, edx
and esi, edx
add esi, edi
add eax, edx
add eax, 0x25b61a43
sub eax, esi
mov dword [esp + 4], eax
mov eax, dword [esp + 4]
add al, 0x2b
mov edx, dword [esp]
mov byte [esp + edx + 0x18], al
inc dword [esp]
mov eax, dword [esp]
cmp eax, 0xd
jb 0x422970
mov eax, dword [esp + 0x18]
mov edx, dword [0x44d2ec]
test edx, edx
je 0x422a09
xor esi, esi
mov edi, dword [0x44d2f0]
nop
nop
nop
nop
nop
nop
nop
nop
nop
cmp dword [edi + esi*8], 0xe4aa2089
je 0x4229e7
inc esi
cmp edx, esi
jne 0x4229d0
jmp 0x422a09
xor ebx, ebx
jmp 0x422ccd
mov edx, dword [edi + esi*8 + 4]
cmp edx, eax
je 0x422a09
push 0
push ecx
push dword [esp + 0x10]
push 5
push 4
push dword [0x44d2f4]
push edx
call fcn.0043ab60
add esp, 0x1c
xor ebx, ebx
test eax, eax
js 0x422cc1
mov edx, dword [esp + 8]
mov ecx, dword [edx]
xor eax, eax
nop
nop
nop
nop
nop
lea esi, [edx + ecx]
mov ecx, dword [edx + ecx]
add eax, 0x208
add ebx, 0x104
mov edx, esi
test ecx, ecx
jne 0x422a20
test ebx, ebx
jns 0x422a40
mov eax, 0xffffffff
push eax
call fcn.00408cc0
add esp, 4
mov edi, eax
mov eax, dword [esp + 8]
mov edx, dword [eax]
mov dword [esp + 0xc], edi
jmp 0x422a6e
mov word [edi], 0xa
add edi, 2
mov edx, dword [eax]
test edx, edx
je 0x422a93
mov ecx, dword [eax + edx + 0x3c]
add eax, edx
movzx edx, word [ecx]
test dx, dx
je 0x422a60
add ecx, 2
nop
mov word [edi], dx
add edi, 2
movzx edx, word [ecx]
add ecx, 2
test dx, dx
jne 0x422a80
jmp 0x422a60
mov eax, dword [esp + 0xc]
cmp edi, eax
je 0x422bea
mov word [edi], 0
movzx ecx, word [eax]
test cx, cx
je 0x422bf1
xor esi, esi
jmp 0x422ad0
add edx, esi
mov esi, edx
movzx ecx, word [eax + 2]
add eax, 2
test cx, cx
je 0x422b01
cmp eax, edi
jae 0x422b01
mov edx, esi
movzx ebx, cx
xor ecx, ecx
cmp ebx, 0x800
setb byte [esp + 0x10]
mov esi, 1
cmp ebx, 0x80
jb 0x422ac0
movzx ebx, byte [esp + 0x10]
mov cl, bl
xor ecx, 3
mov esi, ecx
jmp 0x422ac0
lea eax, [esi + 1]
mov dword [esp + 0x38], eax
push eax
call fcn.00408cc0
add esp, 4
test esi, esi
mov dword [esp + 0x34], esi
mov dword [esp + 0x30], eax
jle 0x422c0b
lea ecx, [eax + esi]
mov dword [esp + 0x10], ecx
add dword [esp + 0x38], eax
mov esi, eax
mov edx, dword [esp + 0xc]
jmp 0x422b56
mov byte [esi], cl
mov eax, 1
add edx, 2
add esi, eax
cmp esi, dword [esp + 0x10]
jae 0x422c0d
cmp edx, edi
jae 0x422c0d
movzx ecx, word [edx]
test cx, cx
je 0x422c0d
cmp cx, 0x7f
jbe 0x422b40
mov eax, esi
not eax
add eax, dword [esp + 0x38]
cmp eax, 2
jb 0x422bb0
movzx ebx, cx
cmp ebx, 0x7ff
ja 0x422bb0
mov eax, ecx
shr eax, 6
add al, 0xc0
mov byte [esi], al
and cl, 0x3f
or cl, 0x80
mov byte [esi + 1], cl
mov eax, 2
jmp 0x422b47
cmp eax, 3
mov eax, 0
jb 0x422b47
movzx ebx, cx
mov eax, ebx
shr eax, 0xc
or al, 0xe0
mov byte [esi], al
shr ebx, 6
mov eax, ebx
not eax
or eax, 0x3f
add eax, ebx
add al, 0x81
mov byte [esi + 1], al
and cl, 0x3f
or cl, 0x80
mov byte [esi + 2], cl
mov eax, 3
jmp 0x422b47
xor ebx, ebx
jmp 0x422cb8
mov dword [esp + 0x34], 0
push 1
call fcn.00408cc0
add esp, 4
mov esi, eax
mov dword [esp + 0x30], eax
jmp 0x422c0d
mov esi, eax
mov ecx, dword [ebp + 8]
mov byte [esi], 0
mov dword [esp + 0x18], 0x3e313356
mov dword [esp + 0x1c], 0x2011103d
mov dword [esp + 0x20], 0x13146f13
mov word [esp + 0x24], 0x9516
mov dword [esp + 0x26], 0
mov word [esp + 0x2a], 0
mov dword [esp], 0
mov eax, dword [esp]
cmp eax, 0x13
ja 0x422c96
mov eax, dword [esp]
mov edx, dword [esp]
movzx esi, byte [esp + edx + 0x18]
lea edx, [eax + 0x7ea82eeb]
add eax, 0xeb
and eax, esi
or edx, esi
sub edx, eax
mov dword [esp + 4], edx
mov eax, dword [esp + 4]
add al, 0x93
mov edx, dword [esp]
mov byte [esp + edx + 0x18], al
mov eax, dword [esp]
mov edx, eax
and edx, 1
xor eax, 1
lea eax, [eax + edx*2]
mov dword [esp], eax
mov eax, dword [esp]
cmp eax, 0x14
jb 0x422c50
lea eax, [esp + 0x18]
push dword [esp + 0x34]
mov esi, dword [esp + 0x34]
push esi
push eax
call fcn.00409640
mov ebx, eax
push esi
call fcn.00408cd0
add esp, 4
mov eax, dword [esp + 0xc]
push eax
call fcn.00408cd0
add esp, 4
push dword [esp + 8]
call fcn.00438b60
add esp, 4
mov eax, ebx
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret