Function at 0x41e540
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x40
mov edx, dword [esp + 0x5c]
mov ebp, dword [esp + 0x58]
mov ecx, dword [ebp + 4]
mov eax, 0xfffffffe
nop
nop
nop
nop
nop
nop
nop
nop
nop
cmp word [ecx + eax + 2], 0
lea eax, [eax + 2]
jne 0x41e560
sar eax, 1
mov ebx, dword [edx + 4]
mov ecx, 0xfffffffe
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
cmp word [ebx + ecx + 2], 0
lea ecx, [ecx + 2]
jne 0x41e580
sar ecx, 1
lea edx, [eax + ecx]
add edx, 0x1b
test edx, edx
jns 0x41e59e
mov eax, 0xffffffff
jmp 0x41e5a7
add eax, ecx
lea eax, [eax*2 + 0x36]
push eax
call fcn.0040ca10
add esp, 4
mov dword [esp + 8], 0x578249ac
mov dword [esp + 0xc], 0x53bd55a7
mov dword [esp + 0x10], 0x5faa51b1
mov dword [esp + 0x14], 0x5b975d7c
mov dword [esp + 0x18], 0x679a59a0
mov dword [esp + 0x1c], 0x63906589
mov dword [esp + 0x20], 0x6f87619f
mov dword [esp + 0x24], 0x6b986d9f
mov dword [esp + 0x28], 0x77a96948
mov dword [esp + 0x2c], 0x738e7599
mov dword [esp + 0x30], 0x7f97718c
mov dword [esp + 0x34], 0x7b917d8e
mov dword [esp + 0x38], 0x7e27987
mov dword [esp + 0x3c], 0x504
mov dword [esp], 0
mov ecx, dword [esp]
cmp ecx, 0x37
ja 0x41e66b
nop
mov esi, dword [esp]
mov ecx, dword [esp]
movzx ecx, byte [esp + ecx + 8]
mov edx, esi
xor edx, 0x93d4e40e
and esi, 0x13d4e40e
lea edx, [edx + esi*2]
xor edx, ecx
mov dword [esp + 4], edx
mov edx, dword [esp + 4]
add dl, 0xba
mov ecx, dword [esp]
mov byte [esp + ecx + 8], dl
inc dword [esp]
mov ecx, dword [esp]
cmp ecx, 0x38
jb 0x41e630
mov ecx, dword [ebp + 4]
movzx edx, word [ecx]
mov edi, eax
test dx, dx
je 0x41e691
add ecx, 2
mov edi, eax
nop
nop
nop
mov word [edi], dx
add edi, 2
movzx edx, word [ecx]
add ecx, 2
test dx, dx
jne 0x41e680
mov word [edi], 0
movzx ecx, word [esp + 8]
test cx, cx
je 0x41e6c1
lea edx, [esp + 0xa]
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov word [edi], cx
add edi, 2
movzx ecx, word [edx]
add edx, 2
test cx, cx
jne 0x41e6b0
mov word [edi], 0
movzx ecx, word [ebx]
mov esi, eax
test cx, cx
je 0x41e6f1
add ebx, 2
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov word [edi], cx
add edi, 2
movzx ecx, word [ebx]
add ebx, 2
test cx, cx
jne 0x41e6e0
mov word [edi], 0
mov ebp, dword [ebp]
mov eax, 0xfffffffe
nop
nop
cmp word [ebp + eax + 2], 0
lea eax, [eax + 2]
jne 0x41e700
mov ecx, dword [esp + 0x58]
mov edx, dword [ecx + 8]
mov ecx, 0xfffffffe
nop
nop
nop
nop
nop
nop
nop
nop
nop
cmp word [edx + ecx + 2], 0
lea ecx, [ecx + 2]
jne 0x41e720
mov edx, dword [esp + 0x5c]
mov ebx, dword [edx]
mov edx, 0xfffffffe
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
cmp word [ebx + edx + 2], 0
lea edx, [edx + 2]
jne 0x41e740
sar eax, 1
sar ecx, 1
sar edx, 1
add ecx, eax
lea eax, [edx + ecx]
add eax, 0xe
test eax, eax
jns 0x41e764
mov eax, 0xffffffff
jmp 0x41e76d
add ecx, edx
lea eax, [ecx*2 + 0x1c]
push eax
call fcn.0040ca10
add esp, 4
mov edi, eax
movzx ecx, word [ebp]
test cx, cx
je 0x41e7a2
add ebp, 2
mov eax, edi
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov word [eax], cx
add eax, 2
movzx ecx, word [ebp]
add ebp, 2
test cx, cx
jne 0x41e790
mov word [eax], 0x2f
mov dword [esp + 8], 0xd109cf3d
mov dword [esp + 0xc], 0xd566d368
mov dword [esp + 0x10], 0xd978d773
mov dword [esp + 0x14], 0xdd71db6d
mov dword [esp + 0x18], 0xa170df6d
mov dword [esp + 0x1c], 0xa553a315
mov dword [esp + 0x20], 0xa7a4
mov dword [esp], 0
mov ecx, dword [esp]
cmp ecx, 0x1b
ja 0x41e842
nop
nop
mov ecx, dword [esp]
mov edx, dword [esp]
movzx edx, byte [esp + edx + 8]
mov ebp, ecx
xor ebp, 0x169d28ad
and ecx, 0x169d28ad
lea ecx, [ecx*2]
add ecx, ebp
lea ebp, [ecx + edx]
and ecx, edx
mov edx, ebp
xor edx, ecx
add edx, ecx
not ecx
and ecx, ebp
add ecx, ecx
sub ecx, edx
mov dword [esp + 4], ecx
mov ecx, dword [esp + 4]
add cl, 0x9f
mov edx, dword [esp]
mov byte [esp + edx + 8], cl
inc dword [esp]
mov ecx, dword [esp]
cmp ecx, 0x1c
jb 0x41e7f0
add eax, 2
mov ecx, dword [esp + 0x58]
mov ecx, dword [ecx + 8]
movzx edx, word [ecx]
test dx, dx
je 0x41e871
add ecx, 2
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov word [eax], dx
add eax, 2
movzx edx, word [ecx]
add ecx, 2
test dx, dx
jne 0x41e860
mov word [eax], 0
movzx ecx, word [esp + 8]
test cx, cx
je 0x41e8a1
lea edx, [esp + 0xa]
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 0x41e890
mov word [eax], 0
movzx ecx, word [ebx]
test cx, cx
je 0x41e8d1
add ebx, 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 [ebx]
add ebx, 2
test cx, cx
jne 0x41e8c0
mov word [eax], 0
mov dword [esp], 0x292a2bca
mov dword [esp + 4], 0
mov eax, dword [esp + 4]
cmp eax, 3
ja 0x41e947
nop
nop
mov eax, dword [esp + 4]
mov ecx, dword [esp + 4]
movzx edx, byte [esp + ecx]
mov ecx, eax
xor ecx, 0x226c9ac7
and eax, 0x226c9ac7
lea ecx, [ecx + eax*2]
lea eax, [ecx + edx]
and ecx, edx
mov edx, eax
xor edx, ecx
mov ebx, ecx
not ebx
and eax, ebx
add eax, eax
sub eax, edx
mov edx, eax
not edx
and edx, ecx
and eax, ebx
sub eax, edx
mov dword [esp + 8], eax
mov eax, dword [esp + 8]
add al, 0x1d
mov ecx, dword [esp + 4]
mov byte [esp + ecx], al
inc dword [esp + 4]
mov eax, dword [esp + 4]
cmp eax, 4
jb 0x41e8f0
mov eax, esp
push 0
push 0
push 0
push 0xc00000
push eax
push esi
push edi
push dword [esp + 0x70]
call fcn.004212c0
add esp, 0x20
mov ebx, eax
jmp dword [0x44b35c]