Function at 0x418810
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x44
mov edx, dword [esp + 0x60]
mov ebp, dword [esp + 0x5c]
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 0x418830
mov ebx, dword [edx + 4]
mov ecx, 0xfffffffe
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
cmp word [ebx + ecx + 2], 0
lea ecx, [ecx + 2]
jne 0x418850
sar eax, 1
sar ecx, 1
lea edx, [eax + ecx]
add edx, 0x1b
test edx, edx
jns 0x418870
mov eax, 0xffffffff
jmp 0x418879
add eax, ecx
lea eax, [eax*2 + 0x36]
push eax
call fcn.00408680
add esp, 4
mov dword [esp + 8], 0x81528720
mov dword [esp + 0xc], 0x8d2f8331
mov dword [esp + 0x10], 0x893a8f2f
mov dword [esp + 0x14], 0x95458b68
mov dword [esp + 0x18], 0x912a972c
mov dword [esp + 0x1c], 0x9d24933f
mov dword [esp + 0x20], 0x99359f21
mov dword [esp + 0x24], 0x652c9b29
mov dword [esp + 0x28], 0x61bb6784
mov dword [esp + 0x2c], 0x6dde63cf
mov dword [esp + 0x30], 0x69c56fd0
mov dword [esp + 0x34], 0x75c36bde
mov dword [esp + 0x38], 0x71d277c9
mov dword [esp + 0x3c], 0x7370
mov byte [esp + 0x40], 0
mov dword [esp], 0
mov ecx, dword [esp]
cmp ecx, 0x38
ja 0x418957
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov esi, dword [esp]
mov ecx, dword [esp]
movzx ecx, byte [esp + ecx + 8]
lea edx, [esi + ecx]
add edx, 0x44a434e1
add esi, 0xe1
and esi, ecx
mov ecx, edx
xor ecx, esi
add ecx, esi
not esi
and esi, edx
add esi, esi
sub esi, ecx
mov dword [esp + 4], esi
mov edx, dword [esp + 4]
add dl, 0x9b
mov ecx, dword [esp]
mov byte [esp + ecx + 8], dl
inc dword [esp]
mov ecx, dword [esp]
cmp ecx, 0x39
jb 0x418910
mov ecx, dword [ebp + 4]
movzx edx, word [ecx]
mov edi, eax
test dx, dx
je 0x418981
add ecx, 2
mov edi, eax
nop
nop
nop
nop
nop
nop
nop
mov word [edi], dx
add edi, 2
movzx edx, word [ecx]
add ecx, 2
test dx, dx
jne 0x418970
mov word [edi], 0
movzx ecx, word [esp + 8]
test cx, cx
je 0x4189b1
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 0x4189a0
mov word [edi], 0
movzx ecx, word [ebx]
mov esi, eax
test cx, cx
je 0x4189e1
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 0x4189d0
mov word [edi], 0
mov ebp, dword [ebp]
mov eax, 0xfffffffe
nop
nop
cmp word [ebp + eax + 2], 0
lea eax, [eax + 2]
jne 0x4189f0
sar eax, 1
mov ecx, dword [esp + 0x5c]
mov edx, dword [ecx + 8]
mov ecx, 0xfffffffe
nop
nop
nop
nop
nop
nop
nop
cmp word [edx + ecx + 2], 0
lea ecx, [ecx + 2]
jne 0x418a10
inc eax
sar ecx, 1
mov edx, ecx
and edx, eax
add edx, edx
mov edi, dword [esp + 0x60]
mov ebx, dword [edi]
mov edi, 0xfffffffe
nop
cmp word [ebx + edi + 2], 0
lea edi, [edi + 2]
jne 0x418a30
xor ecx, eax
sar edi, 1
add ecx, edx
lea eax, [edi + ecx]
add eax, 0xd
test eax, eax
jns 0x418a52
mov eax, 0xffffffff
jmp 0x418a5b
add ecx, edi
lea eax, [ecx*2 + 0x1a]
push eax
call fcn.00408680
add esp, 4
mov edi, eax
movzx ecx, word [ebp]
test cx, cx
je 0x418a92
add ebp, 2
mov eax, edi
nop
nop
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 0x418a80
mov word [eax], 0x2f
mov dword [esp + 8], 0x49f14b1d
mov dword [esp + 0xc], 0x45ca47c0
mov dword [esp + 0x10], 0x41d043df
mov dword [esp + 0x14], 0xbd29bfcd
mov dword [esp + 0x18], 0xb928bb2d
mov dword [esp + 0x1c], 0xb5e7b735
mov word [esp + 0x20], 0xb3b4
mov dword [esp + 0x22], 0
mov dword [esp], 0
mov ecx, dword [esp]
cmp ecx, 0x1d
ja 0x418b36
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov ecx, dword [esp]
mov edx, dword [esp]
movzx edx, byte [esp + edx + 8]
lea ebp, [ecx + edx]
add ebp, 0xd35b8973
add ecx, 0xd35b8973
not edx
or ecx, edx
sub edx, ecx
lea ecx, [edx*2]
add ecx, ebp
mov dword [esp + 4], ecx
mov ecx, dword [esp + 4]
add cl, 0xc1
mov edx, dword [esp]
mov byte [esp + edx + 8], cl
inc dword [esp]
mov ecx, dword [esp]
cmp ecx, 0x1e
jb 0x418af0
add eax, 2
mov ecx, dword [esp + 0x5c]
mov ecx, dword [ecx + 8]
movzx edx, word [ecx]
test dx, dx
je 0x418b61
add ecx, 2
nop
nop
nop
nop
nop
mov word [eax], dx
add eax, 2
movzx edx, word [ecx]
add ecx, 2
test dx, dx
jne 0x418b50
mov word [eax], 0
movzx ecx, word [esp + 8]
test cx, cx
je 0x418b91
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 0x418b80
mov word [eax], 0
movzx ecx, word [ebx]
test cx, cx
je 0x418bc1
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 0x418bb0
mov word [eax], 0
mov dword [esp + 8], 0x292a2bca
mov dword [esp + 0xc], 0
mov dword [esp], 0
mov eax, dword [esp]
cmp eax, 7
ja 0x418c1e
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov eax, dword [esp]
mov ecx, dword [esp]
movzx ecx, byte [esp + ecx + 8]
add eax, 0x8146b547
xor eax, ecx
mov dword [esp + 4], eax
mov eax, dword [esp + 4]
add al, 0x9d
mov ecx, dword [esp]
mov byte [esp + ecx + 8], al
inc dword [esp]
mov eax, dword [esp]
cmp eax, 8
jb 0x418bf0
lea eax, [esp + 8]
push 0
push 0
push 0
push 0xc00000
push eax
push esi
push edi
push dword [esp + 0x74]
call fcn.0041ae90
add esp, 0x20
mov ebx, eax
jmp dword [0x4463a4]