Function at 0x422550
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x4c
cmp byte [esp + 0x64], 0
je 0x4225a0
mov eax, dword [esp + 0x6c]
mov edx, dword [esp + 0x60]
mov ebp, dword [eax + 4]
mov eax, 0xfffffffe
nop
nop
cmp word [ebp + eax + 2], 0
lea eax, [eax + 2]
jne 0x422570
mov ecx, 0xfffffffe
cmp word [edx + ecx + 2], 0
lea ecx, [ecx + 2]
jne 0x422580
sar eax, 1
sar ecx, 1
lea edx, [eax + ecx]
add edx, 0x1f
test edx, edx
jns 0x4225a7
mov eax, 0xffffffff
jmp 0x4225b0
xor ebx, ebx
jmp 0x422823
add eax, ecx
lea eax, [eax*2 + 0x3e]
push eax
call fcn.004082f0
add esp, 4
movzx ecx, word [ebp]
mov ebx, eax
test cx, cx
je 0x4225e2
add ebp, 2
mov ebx, eax
nop
nop
nop
nop
nop
nop
nop
mov word [ebx], cx
add ebx, 2
movzx ecx, word [ebp]
add ebp, 2
test cx, cx
jne 0x4225d0
mov dword [esp + 0x3c], eax
mov word [ebx], 0x5c
mov dword [esp], 0x3bf639e4
mov dword [esp + 4], 0x3fdd3dd3
mov dword [esp + 8], 0xc32ec121
mov dword [esp + 0xc], 0xc732c517
mov dword [esp + 0x10], 0xcb3ec929
mov dword [esp + 0x14], 0xcf12cd29
mov dword [esp + 0x18], 0xd33cd119
mov dword [esp + 0x1c], 0xd733d530
mov dword [esp + 0x20], 0xdb3fd920
mov dword [esp + 0x24], 0xdf02dd38
mov dword [esp + 0x28], 0xe30be12c
mov dword [esp + 0x2c], 0xe703e512
mov dword [esp + 0x30], 0xeb05e92b
mov dword [esp + 0x34], 0xef03ed01
mov dword [esp + 0x38], 0xf3f2f12c
mov ecx, 0x3ed05a39
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx esi, byte [esp + ecx - 0x3ed05a39]
lea edi, [ecx - 0x3ed05941]
and edi, esi
lea edx, [ecx + esi]
add edx, 0x25ed4fbf
mov ebp, edx
not ebp
and ebp, 1
or edx, 0xfffffffe
add edi, edi
add edx, esi
sub edx, edi
add edx, ecx
mov esi, edx
and esi, ebp
xor edx, ebp
lea edx, [edx + esi*2]
mov byte [esp + ecx - 0x3ed05a39], dl
inc ecx
cmp ecx, 0x3ed05a75
jne 0x422670
add ebx, 2
mov eax, dword [esp + 0x60]
movzx ecx, word [eax]
test cx, cx
je 0x4226e1
add eax, 2
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov word [ebx], cx
add ebx, 2
movzx ecx, word [eax]
add eax, 2
test cx, cx
jne 0x4226d0
mov word [ebx], 0
movzx ecx, word [esp]
test cx, cx
je 0x422711
lea edx, [esp + 2]
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov word [ebx], cx
add ebx, 2
movzx ecx, word [edx]
add edx, 2
test cx, cx
jne 0x422700
mov word [ebx], 0
mov dword [esp + 0x40], 0xbee3bce1
mov dword [esp + 0x44], 0xb22cb0da
mov dword [esp + 0x48], 0xb6b5b42f
xor eax, eax
mov ecx, eax
add cl, 0xa3
xor cl, byte [esp + eax + 0x40]
add cl, 0xe8
mov byte [esp + eax + 0x40], cl
inc eax
cmp eax, 0xc
jne 0x422730
mov dword [esp], 0x11b12fe3
mov dword [esp + 4], 0x15b813bb
mov dword [esp + 8], 0x19f71785
mov dword [esp + 0xc], 0x1db51bad
mov dword [esp + 0x10], 0x1a41fb0
mov dword [esp + 0x14], 0x59303ad
mov dword [esp + 0x18], 0x9e80795
mov dword [esp + 0x1c], 0xdad0bc7
mov dword [esp + 0x20], 0xf15c0fa7
mov word [esp + 0x24], 0xf3f2
mov eax, 0x7c651f22
mov ecx, 0xde
nop
nop
movzx ebx, byte [esp + ecx - 0xde]
mov edx, ecx
and edx, ebx
mov esi, edx
and esi, 0xfffffffd
mov edi, edx
and edi, 2
or edx, 2
imul edx, edi
xor edi, 2
imul edi, esi
add edx, edi
lea esi, [eax + edx]
not edx
add edx, ecx
and edx, ebx
not ebx
and ebx, esi
sub edx, ebx
mov esi, edx
and esi, 0xf
xor edx, 0xf
lea edx, [edx + esi*2]
inc dl
mov byte [esp + ecx - 0xde], dl
dec eax
inc ecx
cmp ecx, 0x104
jne 0x4227a0
lea eax, [esp + 0x40]
mov ecx, esp
push 0
push 4
push 0xc00000
push eax
mov esi, dword [esp + 0x4c]
push esi
push ecx
mov eax, dword [esp + 0x84]
push dword [eax]
call fcn.0041e6b0
add esp, 0x1c
mov ebx, eax
push esi
call fcn.00408300
add esp, 4
mov eax, ebx
add esp, 0x4c
pop esi
pop edi
pop ebx
pop ebp
ret 0x10