Function at 0x422160
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x54
mov ebp, dword [esp + 0x6c]
mov edi, dword [ebp + 4]
mov ecx, 0xfffffffe
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov eax, ecx
cmp word [edi + ecx + 2], 0
lea ecx, [ecx + 2]
jne 0x422180
mov eax, dword [esp + 0x70]
mov esi, dword [eax + 4]
mov eax, 0xfffffffe
nop
nop
nop
nop
nop
nop
nop
cmp word [esi + eax + 2], 0
lea eax, [eax + 2]
jne 0x4221a0
sar ecx, 1
sar eax, 1
lea edx, [ecx + eax]
mov dword [esp + 0x4c], eax
add eax, ecx
add eax, 0x1b
test eax, eax
mov dword [esp + 0x50], ecx
mov dword [esp + 0x48], edx
jns 0x4221ce
mov eax, 0xffffffff
jmp 0x4221d5
lea eax, [edx*2 + 0x36]
push eax
call fcn.0040cda0
add esp, 4
mov dword [esp + 8], eax
mov dword [esp + 0xc], 0x91229f30
mov dword [esp + 0x10], 0x95379301
mov dword [esp + 0x14], 0x890a9737
mov dword [esp + 0x18], 0x8dcd8be8
mov dword [esp + 0x1c], 0x811a8f04
mov dword [esp + 0x20], 0x851c8327
mov dword [esp + 0x24], 0xf91d8711
mov dword [esp + 0x28], 0xfd64fb69
mov dword [esp + 0x2c], 0xf14bff9c
mov dword [esp + 0x30], 0xf566f357
mov dword [esp + 0x34], 0xe96df760
mov dword [esp + 0x38], 0xed73eb76
mov dword [esp + 0x3c], 0xe142ef79
mov dword [esp + 0x40], 0xe3e0
mov byte [esp + 0x44], 0
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
movzx edx, byte [esp + eax + 0xc]
lea ebx, [eax + 0xa5]
mov ecx, 0x5a
sub ecx, eax
xor ecx, ebx
and ecx, edx
xor ecx, ebx
add cl, 0xc7
mov byte [esp + eax + 0xc], cl
mov ecx, eax
xor ecx, 1
and eax, 1
lea eax, [ecx + eax*2]
cmp eax, 0x39
jb 0x422260
movzx ecx, word [edi]
mov edx, dword [esp + 8]
mov eax, edx
test cx, cx
je 0x4222c1
add edi, 2
mov eax, edx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov word [eax], cx
add eax, 2
movzx ecx, word [edi]
add edi, 2
test cx, cx
jne 0x4222b0
mov word [eax], 0
movzx ecx, word [esp + 0xc]
test cx, cx
je 0x4222f1
lea edx, [esp + 0xe]
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov word [eax], cx
add eax, 2
movzx ecx, word [edx]
add edx, 2
test cx, cx
jne 0x4222e0
mov word [eax], 0
movzx ecx, word [esi]
test cx, cx
je 0x422321
add esi, 2
nop
nop
nop
nop
nop
nop
nop
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 0x422310
mov word [eax], 0
mov ebx, dword [ebp]
mov eax, 0xfffffffe
nop
nop
cmp word [ebx + eax + 2], 0
lea eax, [eax + 2]
jne 0x422330
mov ebp, dword [ebp + 8]
mov ecx, 0xfffffffe
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
cmp word [ebp + ecx + 2], 0
lea ecx, [ecx + 2]
jne 0x422350
mov edx, dword [esp + 0x70]
mov edi, dword [edx]
mov edx, 0xfffffffe
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
cmp word [edi + edx + 2], 0
lea edx, [edx + 2]
jne 0x422370
sar eax, 1
sar ecx, 1
sar edx, 1
add ecx, eax
lea eax, [edx + ecx]
add eax, 0x13
test eax, eax
jns 0x422394
mov eax, 0xffffffff
jmp 0x42239d
add ecx, edx
lea eax, [ecx*2 + 0x26]
push eax
call fcn.0040cda0
add esp, 4
mov esi, eax
movzx eax, word [ebx]
mov dword [esp + 4], esi
test ax, ax
je 0x4223d1
add ebx, 2
mov esi, dword [esp + 4]
nop
nop
nop
nop
nop
mov word [esi], ax
add esi, 2
movzx eax, word [ebx]
add ebx, 2
test ax, ax
jne 0x4223c0
mov word [esi], 0
mov word [esi], 0x2f
mov dword [esp + 0xc], 0x81498775
mov dword [esp + 0x10], 0x8d3e8338
mov dword [esp + 0x14], 0x89388f23
mov dword [esp + 0x18], 0x95218b35
mov dword [esp + 0x1c], 0x91209725
mov dword [esp + 0x20], 0x9d63932d
mov word [esp + 0x24], 0x9f9c
mov dword [esp + 0x26], 0
mov byte [esp + 0x2a], 0
mov eax, 0xec076461
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx ecx, byte [esp + eax + 0x13f89bab]
xor ecx, eax
mov edx, 1
sub edx, ecx
mov ebx, 0xe5
sub ebx, ecx
and ecx, 1
and edx, 1
and ebx, 0xfe
or ebx, edx
xor ebx, 0xfe
lea ecx, [ebx + ecx*2]
mov byte [esp + eax + 0x13f89bab], cl
inc eax
cmp eax, 0xec076480
jne 0x422430
add esi, 2
movzx eax, word [ebp]
test ax, ax
je 0x4224a4
add ebp, 2
mov ebx, dword [esp + 0x68]
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov word [esi], ax
add esi, 2
movzx eax, word [ebp]
add ebp, 2
test ax, ax
jne 0x422490
jmp 0x4224a8
mov ebx, dword [esp + 0x68]
mov word [esi], 0
movzx eax, word [esp + 0xc]
test ax, ax
je 0x4224d3
lea ecx, [esp + 0xe]
mov ebp, dword [esp + 0x6c]
nop
mov word [esi], ax
add esi, 2
movzx eax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4224c0
jmp 0x4224d7
mov ebp, dword [esp + 0x6c]
mov word [esi], 0
movzx eax, word [edi]
test ax, ax
je 0x422501
add edi, 2
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov word [esi], ax
add esi, 2
movzx eax, word [edi]
add edi, 2
test ax, ax
jne 0x4224f0
mov word [esi], 0
mov dword [esp + 0xc], 0x9392917a
mov dword [esp + 0x10], 0
xor edx, edx
jmp dword [0x44acd0]