Function at 0x422870
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x478
xor ebx, ebx
cmp byte [esp + 0x490], 0
jne 0x422c4f
mov edi, dword [esp + 0x498]
mov esi, dword [esp + 0x48c]
mov dword [esp + 0x18], 0
mov dword [esp + 0x1c], 0
mov dword [esp + 0x20], 0xa10cbf11
mov dword [esp + 0x24], 0xa577a307
mov dword [esp + 0x28], 0xa946a774
mov dword [esp + 0x2c], 0xad00ab0e
mov dword [esp + 0x30], 0x9190af02
mov eax, ebx
add al, 0xce
xor al, byte [esp + ebx + 0x20]
add al, 0x90
mov byte [esp + ebx + 0x20], al
inc ebx
cmp ebx, 0x14
jne 0x4228d0
lea eax, [esp + 0x20]
lea ecx, [esp + 0x18]
push eax
call fcn.0043c2d0
push 0xebc73df8
push dword [esp + 0x1c]
call fcn.0043e140
add esp, 8
lea ecx, [esp + 4]
push ecx
push 0x44159c
push 1
push 0
push 0x4415ac
call eax
test eax, eax
js 0x42297f
mov eax, dword [esp + 4]
mov ecx, dword [eax]
lea edx, [esp + 0xc]
push edx
push 0x4415bc
push eax
call dword [ecx]
test eax, eax
js 0x422986
mov ebx, 0xfffffffe
nop
nop
nop
nop
nop
nop
nop
nop
cmp word [esi + ebx + 2], 0
lea ebx, [ebx + 2]
jne 0x422940
mov edi, dword [edi + 8]
mov eax, 0xfffffffe
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
cmp word [edi + eax + 2], 0
lea eax, [eax + 2]
jne 0x422960
sar ebx, 1
sar eax, 1
add eax, ebx
add eax, 2
test eax, eax
jns 0x42298d
mov eax, 0xffffffff
jmp 0x42298f
xor ebx, ebx
jmp 0x422c4f
xor ebx, ebx
jmp 0x422c45
add eax, eax
push eax
call fcn.004080f0
add esp, 4
movzx ecx, word [edi]
mov ebp, eax
test cx, cx
je 0x4229c2
add edi, 2
mov ebp, eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov word [ebp], cx
add ebp, 2
movzx ecx, word [edi]
add edi, 2
test cx, cx
jne 0x4229b0
mov dword [esp + 8], eax
add ebx, 2
mov word [esp + 0x20], 0xe934
xor esi, esi
mov dl, 1
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx edi, byte [esp + esi + 0x20]
mov ecx, esi
or ecx, 0xc2b600a8
xor ecx, edi
add ecx, 0xea4ffabf
mov edi, ecx
and edi, 1
xor ecx, 1
lea ecx, [ecx + edi*2]
mov byte [esp + esi + 0x20], cl
mov esi, 1
test dl, 1
mov edx, 0
jne 0x4229e0
movzx ecx, word [esp + 0x20]
mov word [ebp], cx
add ebp, 2
mov edx, dword [esp + 0x48c]
movzx ecx, word [edx]
test cx, cx
je 0x422a54
add edx, 2
mov esi, dword [esp + 8]
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov word [ebp], cx
add ebp, 2
movzx ecx, word [edx]
add edx, 2
test cx, cx
jne 0x422a40
jmp 0x422a58
mov esi, dword [esp + 8]
mov word [ebp], 0
mov eax, dword [esp + 0xc]
mov ecx, dword [eax]
push 0
push esi
push eax
call dword [ecx + 0x14]
test eax, eax
js 0x422ad8
mov eax, dword [esp + 4]
mov ecx, dword [eax]
push 1
push 0
push eax
call dword [ecx + 0x4c]
test eax, eax
js 0x422ad8
mov eax, dword [esp + 4]
mov ecx, dword [eax]
lea edi, [esp + 0x270]
push 1
lea edx, [esp + 0x24]
push edx
push 0x104
push edi
push eax
call dword [ecx + 0xc]
test eax, eax
js 0x422ad8
mov eax, dword [esp + 0x498]
mov edi, dword [eax + 4]
mov eax, 0xfffffffe
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
cmp word [edi + eax + 2], 0
lea eax, [eax + 2]
jne 0x422ac0
sar eax, 1
add ebx, eax
jns 0x422adf
mov ebx, 0xffffffff
jmp 0x422ae1
xor ebx, ebx
jmp 0x422c32
add ebx, ebx
push ebx
call fcn.004080f0
add esp, 4
movzx ecx, word [edi]
mov edx, eax
test cx, cx
je 0x422b11
add edi, 2
mov edx, eax
nop
nop
nop
nop
nop
nop
nop
mov word [edx], cx
add edx, 2
movzx ecx, word [edi]
add edi, 2
test cx, cx
jne 0x422b00
mov dword [esp + 0x10], edx
mov dword [esp + 0x14], eax
mov word [esp + 2], 0x2e52
xor ecx, ecx
mov al, 1
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx esi, byte [esp + ecx + 2]
lea edi, [ecx + esi]
mov ebx, 0x4cefb9fa
sub ebx, ecx
or ebx, esi
lea esi, [ebx + ecx]
add esi, 0xb3104606
mov edx, esi
and edx, 0xfffffffd
mov ebp, esi
and ebp, 2
mov ebx, esi
or ebx, 0xfffffffd
inc ebx
imul ebx, edx
or esi, 2
imul esi, ebp
sub ebx, esi
lea edx, [edi + ebx]
lea esi, [ebx + edi]
add esi, 0xb3104605
mov edi, esi
not edi
or edi, 0x677dcfd7
add edx, edi
add edx, 0xb3104605
xor esi, 0x677dcfd7
lea ebx, [esi + edx*2]
add ebx, 2
and esi, 1
or ebx, 1
add ebx, esi
mov byte [esp + ecx + 2], bl
mov ecx, 1
test al, 1
mov eax, 0
jne 0x422b30
movzx ecx, word [esp + 2]
mov eax, dword [esp + 0x10]
mov word [eax], cx
add eax, 2
mov esi, dword [esp + 0x48c]
movzx ecx, word [esi]
test cx, cx
je 0x422bf3
add esi, 2
mov edx, dword [esp + 0x498]
lea edi, [esp + 0x270]
nop
nop
nop
nop
nop
nop
nop
nop
mov word [eax], cx
add eax, 2
movzx ecx, word [esi]
add esi, 2
test cx, cx
jne 0x422be0
jmp 0x422c01
mov edx, dword [esp + 0x498]
lea edi, [esp + 0x270]
mov word [eax], 0
mov eax, dword [edx + 0x14]
dec eax
push 1
push eax
push dword [edx + 0x10]
push dword [edx + 0xc]
push edi
mov esi, dword [esp + 0x28]
push esi
push dword [edx]
call fcn.00421e20
add esp, 0x1c
mov ebx, eax
push esi
call fcn.00408100
add esp, 4
mov esi, dword [esp + 8]
mov eax, dword [esp + 0xc]
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
push esi
call fcn.00408100
add esp, 4
mov eax, dword [esp + 4]
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, ebx
add esp, 0x478
pop esi
pop edi
pop ebx
pop ebp
ret 0x10